[rabbitmq-discuss] Losing messages, why?
vertolet666 at yandex.ru
Tue Mar 1 09:59:10 GMT 2011
01.03.2011, 10:22, "Matthias Radestock" <matthias at rabbitmq.com>:
> DOBRO Sergei wrote:
>>> In the list_* output you sent, which consumers/queues are in the
>>> "broken" state where their connected clients aren't receiving
>> All the consumers, queues, bindings and connections are present.
> Understood, but my question was *which specific* worker(s) (and their
> associated consumers/queues) had stopped working at the time you ran
> these commands?
O.k., let me explain what is exactly going on.
As I said, each worker declares a queue with its own routing key and starts consuming from that queue. All their queues are bound to the same exchange of direct type.
worker1 -> queue1 -> ex.direct (routing_key1),
worker2 -> queue2 -> ex.direct (routing_key2),
worker6 -> queue6 -> ex.direct (routing_key6),
There are six workers. Other clients publish messages to exchange "ex.direct" with the routing key which is determined randomly from the values of array (routing_key1, routing_key2, ...., routing_key6).
So, the workers receive messages randomly too. That's why I can not tell you which worker(s) stops receiving messages.
Now let me tell you why I'm using this stupid method :). Why "stupid"? Because it's a random (not round-robin) dispatching.
But, in my case it is more stable way. Yes, I have already tried to run workers consuming messages from the same queue, but the issue occured more often. So, having round-robin pattern (one queue) all the workers stop receiving messages at once.
> If restarting them works fine then the problem is most certainly client
> As I said, you may want to tap the network to check whether messages do
> indeed still get sent to the broken workers.
RabbitMQ and the workers are running on the same machine. Each connection's IP is 127.0.0.1. Can you give me some advice? Which software to use to access the data flowing across the connection RabbitMQ<->worker?
More information about the rabbitmq-discuss