qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: onMessage() always acknowledges msg even if Session is set to CLIENT_ACK
Date Wed, 09 Mar 2011 20:21:43 GMT
Just to follow up on this.
I verified that if you don't ack the messages and once you close your
session, the messages are then put back on the queue with the redelivered
flag set.
So another consumer will get it.


On Mon, Mar 7, 2011 at 6:07 PM, Rajith Attapattu <rajith77@gmail.com> wrote:

> Hi Kim,
> I ran a test using MessageListener with CLIENT_ACKNOWLEDGE and it works as
> expected.
> I verified using logging that the message accept command is only sent if I
> call message.acknowledge() or session.acknowledge().
> Between how did you verify that the messages are acked ? is it using logs
> or using mgt tools ?
> However if I don't ack the messages and close the consumer, then another
> consumer should be getting the messages with the redelivered flag set.
> But in my testing it seems that the broker is not redelivering the
> messages. I will investigate this tomorrow and get back to you.
> Regards,
> Rajith
> On Mon, Mar 7, 2011 at 12:41 PM, Kim Garcia <jsmam97@hotmail.com> wrote:
>> Hello All,
>> I am trying to set up a ring queue in which multiple clients will want to
>> read the same messages. I set up my session as CLIENT_ACKNOWLEDGE, so that I
>> will need to manually acknowledge the message (although I never intend to
>> due to the multiple clients). I would like to use a MessageListener to be
>> notified every time a new message arrives on the queue. So when onMessage()
>> is called, I process the message, but then when onMessage() returns, it
>> automatically acknowledges the messge. The problem is that once the message
>> is acknowledged, the message will be thrown away and the other clients won't
>> be able to get the message.
>> Is it possible to use the MessageListener to monitor the queue and call
>> onMessage() to process the messages --- but NOT acknowledge the message?
>> Thank you.

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