activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwotman <>
Subject Re: hasFrameToRead always returns false after first message
Date Fri, 13 Nov 2009 16:51:29 GMT

Thanks Roger.  My original issue was that I hadn't explicitly set the
prefetch size.  I don't have to worry about the nack issue
because,eventually, every message does get acknowledged (if it fails after
retries, it'll be acknowledged and notifications sent out).  My main issue
now is that I don't see a way through STOMP to set my session in
INDIVIDUAL_ACKNOWLEDGE mode.  If I ack a message out of order, then the
messages read before it in the queue will also be acknowledged.  The
individual_acknowledge mode is not part of the JMS spec and, in Java, I need
to explicitly use activemq classes to set that.  In the possible headers
when establishing a connection with STOMP, I don't see a way to do that. 
Anybody know if there's an undocumented way to set a header with STOMP
that'll allow for use of INDIVIDUAL_ACKNOWLEDGE

Roger Hoover wrote:
> I don't know about the PHP stomp client that you're using but the STOMP
> protocol and AMQ broker support what you want.  I wrote a twisted python
> STOMP client that can concurrently process stomp messages and ack them in
> any order.
> A potential issue with the approach you've described is that STOMP has no
> way to for a client to reject a message.  There's no nack operation.  So
> if
> your client experiences an error trying to process a message and does not
> ack that message, you've effectively just reduced your
> activemq.prefetchSize
> by 1.  Eventually, you'll hit zero and no longer get messages from the
> broker.  The only option is to unsubscribe and subscribe again.
> Roger
> On Thu, Nov 12, 2009 at 1:20 PM, jwotman <> wrote:
>> OK.  I see now that the stomp client does not allow reading of next
>> message
>> until the message already read has been acknowledged.  This does not
>> match
>> with what we need.  Ideally, we'd like to "browse" the queue with Stomp
>> and
>> then acknowledge messages out of order when and if the operation
>> connected
>> with the message succeeds as part of a separate STOMP session.  Messages
>> are
>> being sent with INDIVIDUAL_ACKNOWLEDGE.   As a less desirable solution,
>> we've implemented a message feed, using a servlet and then the php
>> application can acknowledge any message when it needs.
>> Is there another way to do this purely using STOMP?
>> Hi Dejan:
>> Thanks for the correction.  However, I'm getting the same result.
>> --
>> View this message in context:
>> Sent from the ActiveMQ - User mailing list archive at

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message