if messages not comes for 3-4 hoyrs, queue goes in idel state & stop acknowledging new messages.

889 views
Skip to first unread message

Akshay Jain

unread,
Apr 22, 2019, 3:23:55 AM4/22/19
to rabbitmq-users
Hi Team, 

I am using rabbitmq version 3.7.7 & facing an issue, in my case data flow in queue is not so frequent, if messages comes in queue after 3-4 hours till that time queue goes in idle state & stop acknowledging messages. for now we stop & start consumer, queue comes in active state & starts working but it increase manual work & reduce efficiency. 

please help to solve this issue permanently.     

Daniil Fedotov

unread,
Apr 22, 2019, 9:39:08 AM4/22/19
to rabbitmq-users
Hi,

Idle state means that the queue did not get any messages or does not have a consumer for a while. If there are consumers connected and messages to deliver - the queue should do that. If messages are being published - it should process them. Idle state does not prevent that.
Can you clarify what does "acknowledging messages" mean in this context? Are you talking about publisher confirms?
Can you describe your scenario in more detail? How do you publish a message, do you have publisher confirms enabled, what are the consumer prefetch and acknowledgement settings, does the consumer acknowledge all the messages it gets? And what do you see at the queue level: how many messages are ready/unacked, what are the rates?

Akshay Jain

unread,
Apr 22, 2019, 10:04:34 AM4/22/19
to rabbitm...@googlegroups.com
Hi dfedotv,

Queue did not get any messages for 3-4 hours, after 3-4 hours of idle state if new message comes it do not published or acknowledged on queue console.

Acknowledging messages: means queue have data but do not ack or publish them after idle state of 3-4hours.

But at same time if I stop consumer and start again queue changes state from idle to running and start publishing messages.

--
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 email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniil Fedotov

unread,
Apr 22, 2019, 10:41:25 AM4/22/19
to rabbitmq-users
What do you mean that message is not published or acknowledged on queue console? Is it unacknowledged? How many ready and unacknowledged messages does the queue have?
Can you please provide info mentioned in my previous post?
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitm...@googlegroups.com.

Akshay Jain

unread,
Apr 22, 2019, 11:38:02 AM4/22/19
to rabbitm...@googlegroups.com
Yes it is unacknowledged, queue have 50 messages in ready state and 0 in unacknowledged state.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.

Daniil Fedotov

unread,
Apr 22, 2019, 12:25:28 PM4/22/19
to rabbitmq-users
And does this queue have consumers active at that point?

It's not easy to help you when you only provide small pieces of information.
Can you provide more details mentioned in my previous posts?

Akshay Jain

unread,
Apr 23, 2019, 3:07:02 AM4/23/19
to rabbitmq-users
Danill,

Please check below  screen shot it may help in understanding, also if required i can share team-viewer to remote access of my system to resolve.

Also i have gone through some blogs which were showing that it can be resolved using TCP Heartbeat, will it ?

Screenshot from 2019-04-23 12-32-14.png

Michael Klishin

unread,
Apr 23, 2019, 9:08:39 AM4/23/19
to rabbitmq-users
By far the most likely reason is that your consumers haven't acknowledged [1] those messages.
See consumers logs and metrics, if any, make sure your consumer delivery handlers do handle exceptions.
If you can reproduce this condition, take a traffic capture and see what consumers actually send [2].

Heartbeats only help detect stale TCP connections quicker [3], which may be relevant here but we have no evidence of that.
[1] explains the automatic requeueing behavior and when it goes into effect.


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 email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Akshay Jain

unread,
Apr 24, 2019, 6:52:45 AM4/24/19
to rabbitmq-users
Hi Michael,

I am not getting it properly, we are an eCommerce company & sending OTP as notification is very important for us but we are facing issue in same.

Can we have a call to resolve this issue also if required i can share remote access of my system, 

Michael Klishin

unread,
Apr 24, 2019, 7:51:35 AM4/24/19
to rabbitm...@googlegroups.com
I don't have much to add to at least 2 recommendations given earlier. See whether your consumers handle and logs exceptions, acknowledge deliveries when they are supposed to and don't run into channel exceptions (which are easy to spot in RabbitMQ logs).

I'm afraid jumping on a call with you would constitute free consulting and this is not something our team offers.
Consider buying a support subscription from Pivotal if you need more guidance on how your applications use RabbitMQ.

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 email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages