ActiveMQ Consumer Hangs

后端 未结 3 941
小蘑菇
小蘑菇 2020-12-29 12:30

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 h

相关标签:
3条回答
  • 2020-12-29 12:51

    Too late for you, but I had the same problem and the problem was that I was trying to add things to the queue using the same connection I was using to take things off of the queue.

    Once I separated them (two completely different contexts, one for producing and the other for consuming), the problem resolved itself.

    0 讨论(0)
  • 2020-12-29 12:57

    A colleague of mine stumbled onto something interesting, and I just found an explanation on the internet: http://activemq.2283324.n4.nabble.com/Consumer-is-not-able-to-pick-messages-from-queue-td2531722.html

    Apparently there is a page size that can get filled when you have a selector and all the messages are in the same queue. This was happening for us - I hadn't started the consumer, so I ended up with a full page of messages with selectors for a different consumer, and this was causing my running consumer to not get any additional work sent to it.

    0 讨论(0)
  • 2020-12-29 12:59

    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

    0 讨论(0)
提交回复
热议问题