Net--RabbitMQ icon indicating copy to clipboard operation
Net--RabbitMQ copied to clipboard

Client stops consuming

Open DOBRO opened this issue 12 years ago • 3 comments

Hi,

I've run into the issue of consuming messages from a queue.

I wrote a daemon which forks several child processes. Each child process is a Net::RabbitMQ client which connects to RabbitMQ server, binds to a queue with its own routing key and starts to consume messages. So, all the clients (processes) are bound to the same queue with different routing keys. When the message is received, the client processes it and publish another message to another exchange.

Each process has its life cycle: while (1) { my $frame = $mq->recv();

processing frame...

#.......

publish the confirmation

$mq->publish($channel, $another_routing_key, $some_data, {exchange => $another_exchange}); };

After a while one of the clients (not all of them) stops consuming messages until I restart the daemon. The problem appeared in version 0.1.9 which I installed from CPAN. After upgrading to 0.2.x this happens more often (every day). I had to downgrade Net::RabbitMQ to 0.1.9 because it's more stable. The issue happens once a week :)

I see no errors in the log file.

Any ideas?

Thanks.

DOBRO avatar Sep 20 '11 10:09 DOBRO