artem.pronchakov
artem.pronchakov

Reputation: 167

ActiveMQ "freeze" message on queue consuming

ActiveMQ: 5.10.2 inside ServiceMix's Karaf OSGi

KahaDB persistence.

Default broker settings. Default settings in connections(tcp://x.x.x.x:61616)

16 queues predefined in activemq.xml.

Two client connections to ActiveMQ. One for producer sessions, one for consumer sessions.

Producers send messages to all queues.

16 consumer sessions consumes messages.

All going ok, but: If I reduce number of consumers to 1 (or 2 or three, I don't know where is threshold) so that messages from 1 queue are consuming and messages from another queues are storing. While some time passing, I see this picture:

  1. That 1 consumer stop receiving message. He think that there are no more messages.
  2. From activemqweb I can see that message count on that consuming queue is > 0
  3. From activemqweb I cannot see any messages in Message Browser in that consuming queue.
  4. I can see messages from other queues in Message Browser.

If I start some other consumer(or restart activemq) to consume messages from different queue I see:

  1. I start to see messages in first queue Message Browser(those that were sent before but haven't been seen after "freeze").
  2. First queue continue to consuming
  3. Second queue begin to consuming.
  4. The "freeze" can occur again in some time and start consuming another queue will help again.

If I start all consumers I see no "message freeze". If just stop and start consumer on "frozen" queue, nothing happens. It need to be done on "unfrozen queue" to "unfroze" "frozen queue".

It also happens if there is no active producer, only consumer.

What can it be?

Thank you.

Upvotes: 0

Views: 1363

Answers (1)

artem.pronchakov
artem.pronchakov

Reputation: 167

Oups. I've found what it was.

It's just available memory exceeded.

I didn't set -Xms and -Xmx, so it run with only 512mb of max heap.

And when messages size stored and not consumed is closed to the top, I get these behavior.

Upvotes: 0

Related Questions