RabbitMQ message sequence guarantee

I have a project that includes rabbitmq. The problem that I have is illustrated as follows:

Problemm

So let me describe the scenario. I have n number of queues that subscribed to topic1. Now my question is: if I publish 3 messages in a sequence that appear as 1, 2 and 3 in a broker called Exchange, will rabbitmq guarantee the sequence of these messages in all queues?

The only thing I found was in the rabbitmq documentation. Warranties for ordering messages that received

Section 4.7 of the main AMQP specification 0-9-1 describes the conditions under which order is guaranteed: messages published in one channel passing through one exchange and one queue and one outgoing channel will be received in the same order and sent. RabbitMQ has offered more reliable warranties since the release of 2.7.0.

So can someone help me and point me to the correct document or example that shows whether this is guaranteed or not?

thank

+4
source share
2 answers

What you quoted answers your question perfectly. The only question is what your consumer looks like. If each queue is connected to its own channel and that the consumer is working in its own thread, this thread will see each message in order as it is published.

+1

, , / . , , .

, , , , , Channel. RabbitMQ "-" channels. , , .

, ( ), , . , , , ( ).

: https://www.rabbitmq.com/tutorials/amqp-concepts.html

AMQP. , TCP, . AMQP 0-9-1 , " , TCP-".

+1
source

Source: https://habr.com/ru/post/1531632/


All Articles