[rabbitmq-discuss] No message is delivered to consumer workers when a message is requeued

Pham Cong Dinh pcdinh at gmail.com
Thu Apr 5 06:28:01 BST 2012

Hi all,

I got a strange issue with RabbitMQ when I launched 4 workers to
listen on a single queue to process incoming message.

However, there is a bug with worker that caused an invalid message can
not be processed successfully. In that case, that message will be
redelivered back to the original queue using

channel.basic_reject(delivery_tag, requeue=True) # Python code (Kombu
# Just reject the message. Not closing the channel or releasing
connection after that

As you may guess, none of 4 workers could process the message because
the bug. After that no worker received incoming message any more. The
output of strace shows that worker still polled RabbitMQ for new
message but they received no message. I also listed all the message
available in the queue using rabbitmqctl and found that there were 4
unacknowledged messages and a lot of incoming messages in the queue

Have anyone here experienced the same issue?

My configuration:

consumer_options = {
    'exchange_name': 'feed',
    'exchange_type': 'direct',
    'queue_name': 'feed',
    'routing_key': 'importer',
    'durable': True,
    'delivery_mode': 2,
    'no_ack': False,
    'auto_ack': False,
    'prefetch_count': 1

I use the same consumer_tag for all workers. Did it cause any problem?



More information about the rabbitmq-discuss mailing list