Repository navigation
Replace the consumer channel when the server cancels a consumer - #432
Merged
Merged
Conversation
eglitobias
marked this pull request as draft
August 21, 2026 08:22
eglitobias
force-pushed
the
fix-cancelled-consumer-recovery
branch
from
August 21, 2026 08:23
54695b3 to
77aa2e3
Compare
eglitobias
marked this pull request as ready for review
August 21, 2026 08:32
Member
|
@eglitobias I have found a few more issues and known flaky test patterns, will push an update once I'm done with them |
Member
|
I'll submit a follow-up PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On RabbitMQ 4.3 a quorum queue cancels a timed out consumer instead of closing the channel. Hutch re-subscribed on the same channel, which loses messages: the broker keeps routing deliveries to the cancelled tag, the client has already unregistered it, so Bunny drops the frame with
no consumer for tag .... Those messages sit unacked under a consumer that no longer exists, and only closing the channel gets them back.handle_cancellationnow replaces the channel (close, reopen, re-declare the exchange) and re-subscribes every consumer. On its own thread, because closing the channel shuts down the work pool the callback runs on.Reproduced with a quorum queue,
x-consumer-timeout5s, handler blocked 20s: four dropped deliveries per run before, none after.channel_recovery_spec.rbpassed most of the time anyway, because the next timeout tick usually requeued them. Only 4.3 is affected, earlier versions close the channel themselves.Also cut that spec's second
wait_forfrom 90s to 15s.