Open DOBRO opened 13 years ago
Hi!
I reported a similar bug in CPAN: https://rt.cpan.org/Public/Bug/Display.html?id=76206
A Perl program running Net::RabbitMQ seems to have gotten stuck in subroutine recv after I ran the script and does not respond to RabbitMQ messages being published. I set a breakpoint at XS_Net__RabbitMQ_recv, but gdb does not stop there. I copy here the output of the bt command after I pressed Control-C:
(gdb) bt
__buf=<value optimized out>, __fd=<value optimized out>)
at /usr/include/bits/unistd.h:45
__buf=<value optimized out>, __fd=<value optimized out>)
at amqp_socket.c:179
piggyback=0) at RabbitMQ.xs:102
my_perl=<value optimized out>, cv=<value optimized out>) at RabbitMQ.xs:457
(gdb) continue Continuing.
regards, Matti Linnanvuori
If the RabbitMQ Server closes the channel, the client might get stuck: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2012-April/019572.html
I have implemented channel close callback that can help in client getting stuck. My pull request now includes that feature.
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.