activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <>
Subject Re: Any workaround for Stomp not supporting prefetch size of 0?
Date Fri, 30 Nov 2012 09:51:00 GMT

the problem with 0 prefetch and Stomp is that there's no mechanism in
stomp to explicitly pull the message from the broker. You can only
subscriber and unsubscribe from the destination. I'm not aware of any

Dejan Bosanac
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: @dejanb
ActiveMQ in Action:

On Fri, Nov 30, 2012 at 12:43 AM, Juan Nin <> wrote:
> Hi!
> I got the following scenario:
> A queue with thousands of messages under ActiveMQ 5.3.2, which will be
> consumed from a PHP web application.
> The PHP application uses the FuseSource Stomp client.
> Each time the PHP application is run, it needs to consume only one message
> from the queue.
> The problem we're having, is related to using a prefetch size of 1, since
> Stomp does not support a prefetch size of 0.
> We only consume and ACK 1 message, but because of the prefetch size of 1, a
> second message is pushed to the client, which upon disconnection from
> ActiveMQ is set for redelivery, being pushed by ActiveMQ to the end of the
> queue.
> We need to consume the message in sequential order, so having these
> messages been pushed back to the end of the queue breaks our app.
> Is there any way of avoiding this behaviour and be able to consume messages
> one by one in sequential order?
> We're considering developing a Java Web Service which uses a prefetch size
> of 0 via OpenWire, and invoke that Web Service from the PHP application,
> but if possible would prefer to avoid that workaround.
> Thanks in advance.
> Juan

View raw message