-
Notifications
You must be signed in to change notification settings - Fork 45
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
Silent failure to ack some messages #39
Comments
Ok, I slightly reworked this to have one channel per thread, now I have something that looks like
What I'm seeing now is just so awkward I cannot think of any reasonable explanation. Here is what the scenario I wrote above becomes:
While no new message get in the queue, there are 6 unacked messages (the 5 in the active threads and one waiting for a free slot to start a new thread). I thus see 94 ready and 6 unacked. I will try to provide a full code example for the two versions. |
I just pushed a test project here https://github.com/Keruspe/rust-amqp-bugs You need to export AMQP_URL then run
You can see that some random messages don't get ack'ed and the last 4 never get ack'ed |
I need to handle several message in parallel so I couldn't use a consumer (see #38), I'm thus using the GetIterator approach.
I have some code that looks like this:
My problem is quite simple, let's say that:
While there are messages in the queue, there are 6 unacked messages (the 5 in the active threads and one waiting for a free slot to start a new thread).
When each thread has finished its jobs, the message is ack'ed properly and a new thread is started, a new messages is poped and is waiting for ack.
The problem appears when there are no more messages in the queue:
Now if some messages are published to the queue, we'll have 11 unacked instead of 6 as the 5 from earlier are never acked effectively.
The text was updated successfully, but these errors were encountered: