You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Josh Carlson <jc...@e-dialog.com> on 2010/03/16 18:14:02 UTC
prefetch=0 does not work with Stomp client?
I am using a Stomp client with ActiveMQ 5.3.0. I have some slow
consumers and find that they wind up locking up messages in the dispatch
queue even when are other consumers available to consume the messages. I
believe prefetch is the cause of this problem.
What I would like to do is set prefetch=0 so that messages only get
dispatched when we actually ask for them by reading on the socket
connection. However, setting prefetch=0 results in no messages being
dispatched at all.
Is prefetch=0 suppose to work with STOMP? Are there any additional
server side settings required to make it work?
Thanks
-Josh
Re: prefetch=0 does not work with Stomp client?
Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Josh,
prefetch size 0 will not work with Stomp as you have to pull messages with
your consumer, and that something that Stomp protocol can't do. I'd
recommend using prefetch size 1 for your use case.
Cheers
--
Dejan Bosanac - http://twitter.com/dejanb
Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net
On Tue, Mar 16, 2010 at 6:14 PM, Josh Carlson <jc...@e-dialog.com> wrote:
> I am using a Stomp client with ActiveMQ 5.3.0. I have some slow consumers
> and find that they wind up locking up messages in the dispatch queue even
> when are other consumers available to consume the messages. I believe
> prefetch is the cause of this problem.
>
> What I would like to do is set prefetch=0 so that messages only get
> dispatched when we actually ask for them by reading on the socket
> connection. However, setting prefetch=0 results in no messages being
> dispatched at all.
>
> Is prefetch=0 suppose to work with STOMP? Are there any additional server
> side settings required to make it work?
>
> Thanks
>
> -Josh
>