Rabbitmq Consumers Stops consuming #1019
Replies: 3 comments 1 reply
-
Please never file issues for questions in repositories that have Discussions enabled. Start with inspecting server logs for clues. If any other part of the application runs into a channel exception, the channel will be closed and there will no be any more deliveries on it. If you don't have an event handler for such events, Perhaps try using a dedicated channel for this consumer, and name its connection appropriately so that A traffic capture would tell you a lot about what's really happening, and so will Java client |
Beta Was this translation helpful? Give feedback.
-
The Heartbeat guide says
If a higher frequency of heartbeats helps, my best guess is that you have periods of very low activity A heartbeat value of 5s in such mostly idle consumers should work OK. In a busy publisher, however, I'd use something closer to the 15-20s range. |
Beta Was this translation helpful? Give feedback.
-
thank you so much for your quick response. I will try what you have recommended and get back to this discussion with the results |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I tried to find the answer to my question in the old issues that were mentioned here but I could not find anything like my problem. I have asked the same question in StackOverflow but I did not get an answer from anyone. sorry if this is long and sorry if I am mentioning this in the wrong place, but I needed help.
I am using rabbitmq in a microservice environment, and I use it to send messages and events to other services.
my projects are java spring boot and I am using rabbitmq java client's latest version.
The problem is that some consumers stop consuming at random times, and the only way to get them going again is to restart the application. I have not been able to find a pattern. here is what I have done and know:
https://stackoverflow.com/questions/22941644/rabbitmq-surviving-a-consumer-disconnection-using-defaultconsumer
https://stackoverflow.com/questions/49338247/rabbitmq-connect-disconnect-notifications
https://stackoverflow.com/questions/17811786/rabbitmq-disconnect-me-after-some-time
https://stackoverflow.com/questions/38771664/rabbitmq-java-client-stops-consuming-messages
https://stackoverflow.com/questions/48033118/temporarily-stop-consuming-rabbitmq-messages-and-resume-later
https://stackoverflow.com/questions/6732936/rabbitmq-consumer-stops-receiving-messages
https://stackoverflow.com/questions/3284731/rabbitmq-message-consumers-stop-consuming-messages
in addition to the code above I have set these parameters as followed:
lowering the default heartbeat made this problem happen less frequently, but it still happens. also, the documents recommend to not set this parameter too low, so I did not lower it from 30.
I have many classes extending this abstract class and implementing the parts that I need to. this is a serious problem for me because some features of our application do not work correctly.
thanks in advance.
Reproduction steps
As I explained in the description, there are no usual steps to this bug and I cannot figure out what is wrong.
Expected behavior
I expected that consumers would not stop listening, or recover if they ever get disconnected
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions