Messages received by RabbitMQ but not delivered to Queues

2,708 views
Skip to first unread message

Robert Kern

unread,
Feb 23, 2017, 4:46:56 PM2/23/17
to rabbitmq-users
Recently I've been facing an issue where Messages are delivered to RabbitMQ, but they don't appear in any Queues. I have been using a separate storage for Messages - so the code that publishes Messages and works on Messages also updates this secondary storage (i'll just call it the db) to update the state of the Message. I am also using durable Queue's.

I only notice the issue when the Queue's appear empty, so I check the number of published Messages according to the db and the numbers vary wildly. For example, this morning there were around 2k Messages in one Queue according to RabbitMQ (it is a slow queue), but the db said there should be around 100k Messages overall (not in that Queue, but in various other Queue's).

The Consumers are all connected fine, not showing as blocked. rabbitctl list_queues shows the queues as empty, the file and socket descriptors are fine (plenty available according to RabbitMQ), plenty of memory and disk space available. Everything appears to be normal, but the Queue's are empty.

If I restart the RabbitMQ process (not clustered), then all the missing Messages start arriving in the Queue's. Lately I have been having to restart the RabbitMQ server process every couple days.

Where can I look to try and debug this more?

RabbitMQ 3.6.6

Thanks!


Michael Klishin

unread,
Feb 23, 2017, 4:51:20 PM2/23/17
to rabbitm...@googlegroups.com, Robert Kern
Management UI has ingress and egress message rates for queues and exchanges.
Your problem is almost certainly in routing: your messages are not routed anywhere.

There is no shortage of threads about that in list archives. TL;DR:

 * Publishing as mandatory will cause unroutable messages to be returned to the publisher. You need to handle them
   of course and how that's done depends on your client.
 * Alternate Exchanges is an easy way to collect unroutable messages, e.g. by using a fanout with a queue
   bound to it: http://www.rabbitmq.com/ae.html
 * Messages can be traced (http://www.rabbitmq.com/firehose.html), although it is not a good idea to leave it
   running for long periods of time.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Michael Klishin

unread,
Feb 23, 2017, 4:52:25 PM2/23/17
to rabbitm...@googlegroups.com, Robert Kern
Also: it's a very good idea to check logs. We really really cannot recommend that enough
on this list.

Consumer connections are never blocked unless they publish (and thus cease to be
purely consumer connections). 

On 24 February 2017 at 00:47:04, Robert Kern (m...@robertkern.com) wrote:
Reply all
Reply to author
Forward
0 new messages