activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Gomes" <>
Subject Re: Why don't Commit() and Receive() throw exceptions ? (NMS)
Date Thu, 21 Aug 2008 14:37:10 GMT
Hi Sebastian,

You can set the prefetch size on the connection URI as follows:


As you noted, the prefetch size is set to 1000 as a default, but it can be
changed on a per-connection basis.  Setting the value to 0 would effectively
disable prefetch.

As far as the issue with Commit not throwing an exception, I haven't had a
chance to look in to that.  If you like, you can enter a JIRA with the
information regarding current behavior and expected behavior so that it can
be scheduled to be fixed in the product.


On Thu, Aug 21, 2008 at 4:34 AM, SebastianR.

> I found out that what i called a local store is in ActiveMQ called
> prefetching. This prefetching is controlled via the variable prefetchSize
> (which in NMS is set in the session.cs to a fixed value of 1000). Do I have
> influence on this value in some way ? It would even better if, there would
> be a possibilty to disable the whole prefetching process.
> I searched the forum already, and found the that method sendPullCommand()
> in
> the ActiveMQMessageConsumer class together with a prefetchSize of zero
> achieves this. However this method doesn't exist in NMS.
> The reason I want to disable prefetching is the following:
> As stated in the first post the Commit() method doesn't throw an exception
> if there is a connection failure. But still messages are received and
> processed correctly, because they are fetched from the local cache. This
> leads to multiple message processing, because the processed messages aren't
> acknowledged and so the broker dispatches them again, if the connection is
> re-established.
> How can I avoid this "multiple message processing", if I can't disable
> prefetching ?
> Regards, Sebastian
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

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