Quorum Queues don't seem to be requing messages properly

398 views
Skip to first unread message

Damian TagDev

unread,
Feb 28, 2022, 11:30:04 AM2/28/22
to rabbitmq-users
Hi,

We've been testing migrating away from classic queues to Quorum queues but have encountered an issue when requeuing messages. Using the management UI to test, each time I get a single message from a Quorum Queue with Nack (Requeue = true) I'm receiving a different message id. I was expecting to receive the same message each time as it should have been requeued at the head of the queue. There were of course no other consumers running while testing.

On my local machine the queues behave as expected but on our test cluster (3 nodes) I get this behaviour.

The cluster was running RabbitMQ v3.8.23 on Erlang v24.1.4. I've retested after upgrading the whole cluster up to RabbitMQ v3.9.13 on Erlang v24.2.2 - this was an in place upgrade. The queues still exhibit the strange behaviour.

The cluster is running on 3 fully patched Windows 2012r2 VMs.

Let me know if you need any more info.

Thanks
Damian

DEVRAB02.zip
DEVRAB01.zip
DEVRAB03.zip

Damian TagDev

unread,
Mar 8, 2022, 7:34:34 AM3/8/22
to rabbitmq-users
Hi,

Has anyone had a chance to look at this yet? I have backups of the mnesia DB from each node if that would help. I was wondering if it was some sort of DB corruption?

Kind Regards
Damian

damian...@gmail.com

unread,
Mar 8, 2022, 7:47:21 AM3/8/22
to rabbitm...@googlegroups.com

With correct attachments this time…

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/WC9I0L8KtqQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/394abb6a-d3ec-4a18-9a7c-24e4e265e757n%40googlegroups.com.

DEVRAB01_report.txt
DEVRAB02_report.txt
DEVRAB03_report.txt

Luke Bakken

unread,
Mar 8, 2022, 8:43:42 AM3/8/22
to rabbitmq-users
Hello,

I've passed this question on to the RabbitMQ eng team and will follow up.

Thanks,
Luke

kjnilsson

unread,
Mar 8, 2022, 9:25:40 AM3/8/22
to rabbitmq-users
Quorum queues do not mutate any aspects of the message apart from the `x-delivery-count` header so what you are receiving is another message.

If there are other returned messages on the queue these aren't necessarily re-ordered in their original order. Any message that has had an attempted delivery effectively enters an unordered state in the queue and quorum queues take a less strict approach to this than classic queues do. Either way the "return to head" feature isn't an invariant that developers can make use of in their applications anyway which is why quorum queues do not implement it in the strictest way.

If it is important to consume messages in the order they arrive at the queue you should use the single active consumer [1] feature but of course you still have to handle potential duplicates due to publishing retries.

Cheers
Karl

damian...@gmail.com

unread,
Mar 8, 2022, 10:06:28 AM3/8/22
to rabbitm...@googlegroups.com

Hi Karl,

 

We have a requirement for message order to be maintained, but we can handle duplicates and each queue only has a single consumer. I’ll give single active consumer a try.

 

Thanks

Damian

damian...@gmail.com

unread,
Mar 8, 2022, 10:40:16 AM3/8/22
to rabbitm...@googlegroups.com

Hi Karl,

 

Can I just check I’m understanding correctly. Are you saying that, if I have a single consumer that gets 10 messages in order, and then does a bulk-nack, those 10 messages will go back on the queue in an undetermined order?

 

And setting “Single Active Consumer” will change the behaviour so that they are re-queued in order?

 

Kind Regards

Damian

 


Sent: 08 March 2022 14:26
To: rabbitmq-users <rabbitm...@googlegroups.com>

Julio Polo

unread,
Apr 12, 2024, 9:33:46 PM4/12/24
to rabbitmq-users
I am in the same boat as Damian.  Did we ever get confirmation that using a "single active consumer" would allow re-queued messages to go back to the quorum queue in their original order?  

I have been using mirrored classic queues and rely on the order of the messages to be maintained if I nack/requeue or disconnect from RabbitMQ before ack'ing those messages.   Since mirrored classic queues will be deprecated, I need quorum queues to not mess with the order of messages.  Order is important.  For example, one queue message sequence could (1) create username message followed by (2) change password.   If the messages are put back in the queue because we inadvertently disconnected prior to ack'ing them, it is not acceptable for us to get (2) change password followed by (1) create username.

Could someone how to preserve the order of quorum queue messages that are re-queued because they were not acked?   Thank you!

-julio

Karl Nilsson

unread,
Apr 13, 2024, 3:16:26 AM4/13/24
to rabbitm...@googlegroups.com


You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/2787fdda-a575-41d9-9c04-422af1616b1en%40googlegroups.com.

Julio Polo

unread,
Apr 19, 2024, 2:10:09 PM4/19/24
to rabbitm...@googlegroups.com
Thank you, Karl!  Setting the delivery-limit did the trick!

-julio

Reply all
Reply to author
Forward
0 new messages