activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Nin <>
Subject Any workaround for Stomp not supporting prefetch size of 0?
Date Thu, 29 Nov 2012 23:43:48 GMT

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

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.


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