-
Notifications
You must be signed in to change notification settings - Fork 598
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
WaitForConfirmsOrDie won't return if DeliveryTag on the client is diverged from the server #1043
Comments
My best guess here is that the server acknowledges with |
No, server sends basic.ack and multiple = false, because it didn't ever seen the second message. I've added it to output , and it looks like this: channel.BasicAcks += (s, e) => Console.WriteLine("Acked {0}, multiple: {1}", e.DeliveryTag, e.Multiple);
|
Message 1 was sent. IMHO this is a bug in a library. Possible fix is to revert client side delivery tag, or do generate it as late as possible before sending to socket. |
@stukselbax it has been a long time, but thank you for this bug report. The fix will ship in version 6.9.0 of this library. |
|
We have a situation in which the IModel is no longer usable for publishing and waiting for publish confirms with WaitForConfirmsOrDie() method. We have injected CorrelationId to the IBasicProperties object when publish a message for distributed tracing. Sometime our correlationId was too big, so the error occurred when the attempt to publish an event was made. We have stuck on the method WaitForConfirmsOrDie(), it blocks the thread and didn't return. It turns out that in such situation the delivery tag tracked on the client has been diverged from delivery tag tracked by the server. We have fixed the issue currently by moving correlationId to headers, nevertheless, I think it is a bug on the RabbitMQ.Client side.
When client generates a new delivery tag it should revert it back if it failed to send the message.
Given the example, we will never see "I'm done..." in the console:
So, here the reproducible example (tried with 5.1.2 and 6.2.1 version - behavior is the same):
The text was updated successfully, but these errors were encountered: