Hi Sebastian,

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

activemq:tcp://servername:61616?session.prefetchSize=5

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.

Thanks,
Jim

On Thu, Aug 21, 2008 at 4:34 AM, SebastianR.
<[EMAIL PROTECTED]>wrote:

>
> 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:
> http://www.nabble.com/Why-don%27t-Commit%28%29-and-Receive%28%29-throw-exceptions---%28NMS%29-tp19048072p19086911.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Reply via email to