[rabbitmq-discuss] return callback works only once

Anton Kirilenko anton.kirilenko at rosalab.ru
Mon Jul 16 15:02:33 BST 2012


On 07/16/2012 05:51 PM, Francesco Mazzoli wrote:
> I took a look at the code, and it is extremely simple. The only time in which we
> remove the handler is when the handler dies. Are you sure that the handler is
> actually looping to always receive messages, and not just receiving once? You
> can check the logs to see if the client has noticed that it went down.
>
> --
> Francesco * Often in error, never in doubt
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
def return_callback(self, method, header, body):
         try:
             log.debug(str(method))
             log.debug(str(header))
             log.debug(str(body))
         except:
             log.exception('something happened')

This is my callback function (I'm using python/pika). It raises no 
exceptions and it is called only once. Should I add something else in 
order to 'loop to always receive messages'?


More information about the rabbitmq-discuss mailing list