Quorum queue message order issue when consumers disconnect #6805
Replies: 3 comments 19 replies
-
Quorum queues starting with 3.10 have two ways of requeueing by design: to avoid unbound disk log growth with pathological consumers that consume and never acknowledge.
|
Beta Was this translation helpful? Give feedback.
-
Hi, Yes, we did the test with delivery-limit set and single active consumer. I think this behaviour is from a list keeping track of requeued messages When getting messages, messages from the head of By this way, the messages will be different each We made a simple test here: We would like to confirm whether this is the intended design as we still expect the messages to go back to the "original order". Thank you and best regards, |
Beta Was this translation helpful? Give feedback.
-
In a quorum queue issuing a basic.get is effectively implemented as a
consume with a prefetch of one. This is why basic.get is disallowed when
using single active consumer.
…On Sun, 22 Jan 2023 at 17:26, rjnilsson ***@***.***> wrote:
Yes, our observation is different. I'll try with a more specific example:
- Quorum queue with delivery-limit (and max-length) with three nodes
(IIRC)
- Single consumer
- Prefetch of 3 (this is not the actual prefetch value that we've been
using)
Initial scenario:
1. Consumer connects to queue
2. Messages arrive [A, B, C, D, E]
3. Consumer receives [A, B, C] into prefetch (of course, this happens
concurrently with 2 above)
4. Consumer processes and acks A, but crashes when attempting to
process B
5. Consumer starts up, connects to queue
6. Consumer receives [B, C, D] into prefetch (actual order of
reception not verified, but we order them internally)
7. Consumer crashes when attempting to process B
8. Return to 5 above
The above continues for some undefined time. We then turn off consumer
auto-restart, and:
1. Start the web admin interface
2. Open the queue
3. Get single message from the queue (nack requeue true) and seemingly
receives one random message of the set [B, C, D]
4. Get single message once again (nack requeue true) and seemingly
receives some other random message of the set [B, C, D]
5. Etc
The "randomness" above are only illustrations (sometimes we actually see B
first, but then something else), but I fail to see any pattern. We would
expect to consistently receive B each time, as was our observation when
using classic mirrored queues.
I also think that the example from @anhanhnguyen
<https://github.com/anhanhnguyen> above shows this in a similar way.
Hope this helps.
—
Reply to this email directly, view it on GitHub
<#6805 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJAHFBHDLWWLWXBS6TDIHLWTVUTJANCNFSM6AAAAAATR3YRXM>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
--
*Karl Nilsson*
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We found an unexpected behaviour with quorum queues when doing get messages, nack and requeue.
The testing procedure:
When we get the messages from the UI, we expect to get the first message in the queue and it should be the same message every time. However, we get different messages each time.
Example:
Publish messages 1, 2, 3, 4, 5, 6, 7, 8.
Consume with prefetch = 5, do not acknowledge.
Kill the consumer.
Get a message from the queue.
Returns message 1.
Get a message from the queue.
Returns message 2.
Get a message from the queue.
Returns message 3.
Etc until message 5, then it starts from 1.
Expectation would be to get the message 1 for each basic-get as long as it's not acknowledged. This happens even if delivery-limit is set.
We are preparing a test to show this behaviour as well.
Thank you,
Anh
Beta Was this translation helpful? Give feedback.
All reactions