New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel creation - error handling during publishing support #41
Comments
You'd like to be able to customize the channel creation, right? This is certainly doable by adding a property to |
Yes, I would like to customize channel creation retry policy. My workaround is to replace default SendOptions#exceptionHandler with one that rethrows exception
and use the following
Putting it all together:
This workaround works only for I would love to create a PR but before that I need some clarifications (I will ask in next thread) |
Thanks for the workaround, this is very informative. Can you please elaborate on the reason the workaround doesn't work because of caching? Note the connection caching can be disabled by passing in a custom Note also that |
When caching is enabled for Mono or channel creation retry always gets the same signal from upstream which might be an error signal. In such case retry does not help even if rabbitmq is again up and running. I haven't noticed that we can customize Mono through SenderOptions. Thanks for information. Regarding |
Closed by #42. |
ExceptionHandler assumes existence of a channel, whereas
Sender#send
orSender#sendWithPublisherConfirms
might fail earlier during channel creation (with exceptionAlreadyClosedException
|ShutdownSignalException
). In such case publishing will not be retried.Currently we can only customize retrying channel.basicPublish through
SendOptions
.It would be great to have such an option for a channel creation. Are you planning to add it in future releases?
Simple workaround is to use reactor retry or retryWhen operators so it is not must-have but it can be misleading especially to new users expecting retry for
ShutdownSignalException
.The text was updated successfully, but these errors were encountered: