activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pimlottc <nabbl...@chris.pimlott.net>
Subject Receiver blocking on a queue with many message - persistence issue?
Date Fri, 25 Jul 2008 16:11:48 GMT

I have a persistent queue backed by kaha (nothing too fancy) with about
800000 messages in it.  My consumer is batch insert them into a database,
receiving mesages one by one and saving them up until reaching a full batch,
persisting them, then acknowledging.

I've notice sometimes the consumer will get stuck waiting to receive, even
though there are still hundreds of thousands messages in the queue.  When I
go into the web console and browser the queue, I only see a few dozen
messages listed - exactly the same number that the consumer was able to
receive before stalling.

I'm guessing this has to do with how activemq managed the persisted
messages.  The ones that show up in the queue browser are those actively in
memory, while the rest are still on disk.

If I set the client to acknowledge one-by-one, then once drains the messages
I see in the query browser, more messages magically appear and the consumer
continues happily along its way.  However, I would have hoped that it would
automatically read more messages into memory when the consumer is still
requesting messages (even if it hasn't acknowledged what it's already
received).

Is there a way to change this behavior?  Can I specific a minimum quantity
of messages to reside "in memory" at all times?  I tried increasing the
prefetch size, hoping this would prompt the server to keep more messages on
hand, but this didn't change anything.

Any suggestions?

-- 
View this message in context: http://www.nabble.com/Receiver-blocking-on-a-queue-with-many-message---persistence-issue--tp18654878p18654878.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message