Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveMQ Consumer Hangs

I have an activeMQ broker using an SSL transport. I have about 10 consumers that are using the broker. I am using camel to configure my routes.

Every so often, it hangs up and will not consume new messages, even if I restart the consumers, even though there are messages pending in the queues.

I started trying to isolate where this was happening by stepping through my consumers one at a time trying to replicate the problem. I finally got to a consumer that I could re-create the problem on. It will hang after a period of time, however, if I go to the active MQ admin console and try to view messages in the queue, it will start running again. I think that Jetty is causing a connection to happen to refresh the queue for the webpage, and thus unblocking some thread problem I am having. How should I debug this?

Thanks

like image 895
Derek Avatar asked Apr 04 '12 19:04

Derek


1 Answers

try setting the queue prefetch to 1 to promote better distribution across consumers and reduce 'stuck' messages on specific consumers

see http://activemq.apache.org/what-is-the-prefetch-limit-for.html

like image 108
Ben ODay Avatar answered Sep 30 '22 02:09

Ben ODay