-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix exception handling when a message consumer is blocking #12616
Conversation
CC @tsegismont |
@gsmet Marked this PR as backporting (after approval and merge of course), as it's clearly a bug. The fix should not conflict with anything else (famous last words) |
@cescoffier Could you pls elaborate a bit about why is this fix needed? |
BTW we should probably update our generated code to use |
When failing the future, as done before, the sender do not get the exception (the vertx global exception handler does). With this it gets a failed reply and can react. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @cescoffier
I trust that the body of verifyFailure
is the same as in MessageConsumerFailureBlockingTest
. Perhaps to better show that there shouldn't be any difference between blocking/non-blocking the two tests could be merged? That's up to you I'm fine with the PR.
Yeah, I should be able to reuse the same method, let me fix this. |
…ception must be captured and sent to the sender as reply exception.
@tsegismont Fixed, I merged both tests. |
I cancelled CI as I need the slots for an emergency release, will restart them later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, now I finally understand! Thanks for the fix.
When a message consumer fails and uses
blocking=true
, the caught exception must be captured and sent to the sender as reply exception.