-
Notifications
You must be signed in to change notification settings - Fork 575
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
Topology recovery retry fixes for auto-delete queues #692
Conversation
@@ -62,7 +65,7 @@ | |||
if (context.entity() instanceof RecordedQueue) { | |||
final RecordedQueue recordedQueue = context.queue(); | |||
AutorecoveringConnection connection = context.connection(); | |||
connection.recoverQueue(recordedQueue.getName(), recordedQueue, false); | |||
connection.recoverQueue(recordedQueue.getName(), recordedQueue); |
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.
Before: if this failed to recover the queue, the error was delivered to the exception handler and swalled from the perspective of this retry logic. So the queue never got recovered.
Now: this recoverQueue method will now throw an exception if an error occurs and the retry logic will catch that and continue to retry as long as the max retry attempts haven't been reached.
@@ -165,14 +164,52 @@ | |||
} else if (consumer.getChannel() == channel) { | |||
final RetryContext retryContext = new RetryContext(consumer, context.exception(), context.connection()); | |||
RECOVER_CONSUMER_QUEUE.call(retryContext); | |||
context.connection().recoverConsumer(consumer.getConsumerTag(), consumer, false); | |||
context.connection().recoverConsumer(consumer.getConsumerTag(), consumer); |
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.
similar concept here as with the recoverQueue... we want this to throw an exception rather than deliver to the exceptionhandler and swallow the exception
@vikinghawk have you created this branch off of |
Disregard my earlier comment, I re-created |
Thank you! |
@vikinghawk can you please double check if I have merged both PRs correctly? There were conflicts in several files. |
@vikinghawk also, can you please submit this PR against |
Actually no need to do that, I managed to merge |
LGTM. Thanks! |
BTW, 5.13.0.RC2 has been released if you want to try it out. |
Proposed Changes
Fixes issues with the topology recovery retry logic around auto-delete queues.
Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CONTRIBUTING.md
documentFurther Comments
If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.