activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SuoNayi <>
Subject Reply:Transactions and memory consumption
Date Fri, 23 Dec 2011 09:29:56 GMT
It's interesting for that.
Maybe you can try to commit the transaction when a fixed numbers of message are consumed or
a timeout time, such as 5 seconds or 10 seconds has expired.


At 2011-12-22 19:11:56,"Gilles Harloux" <> wrote:
>Is there any way to have messages consumed from a queue but not yet
>committed not stored in memory anymore ? Here is a description of what
>my application wants to do :
> - Some messages get send to a queue. Let's say each message is S bytes in size.
> - a consumer is set up on this queue, using a transacted session and
>a message listener to get the messages.
> - the listener gets called each time a message is ready. It consumes
>it. Once every N calls, it commits the session.
>I see is that the queue needs a memoryLimit above N*S for this system
>to be able to work. If it is set it below that value, I get a deadlock
>: New messages can't be dispatched as long as there isn't free memory,
>but memory won't be freed until the session gets committed, which
>depends on getting new messages...
>What I am looking for is a way to lower that memoryLimit below that
>N*S threshold, essentially as low as S. Is there a way that memory can
>get released as soon as the message gets dispatched? This would of
>course imply that in case a rollback is needed, the message gets
>fetched from the storage again.
>TIA for your help,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message