You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Emir Ibrahimbegovic <em...@gmail.com> on 2011/07/25 12:43:37 UTC

Session auto acknowledge

Hello,

I'm trying to download messages from my QPID queue without acknowledging
them. Even though I don't acknowledge them, they still get downloaded from
the queue. How can I check is my QPID queue setup with auto acknowledge(is
there something like that)?

Thanks,
E

Re: Session auto acknowledge

Posted by Emir Ibrahimbegovic <em...@gmail.com>.
Yes I have, I've tried both CLIENT_ACKNOWLEDGE and DUPS_OK_ACKNOWLEDGE same
result, I consume my messages.

Any ideas?

Thanks
On Mon, Jul 25, 2011 at 5:00 AM, Danushka Menikkumbura <
danushka.menikkumbura@gmail.com> wrote:

> Have you created your JMS session with ack mode Session.CLIENT_ACKNOWLEDGE?
>
> Thanks,
> Danushka
>
> On Mon, Jul 25, 2011 at 4:13 PM, Emir Ibrahimbegovic <
> emir.ibrahimbegovic@gmail.com> wrote:
>
> > Hello,
> >
> > I'm trying to download messages from my QPID queue without acknowledging
> > them. Even though I don't acknowledge them, they still get downloaded
> from
> > the queue. How can I check is my QPID queue setup with auto
> acknowledge(is
> > there something like that)?
> >
> > Thanks,
> > E
> >
>

Re: Session auto acknowledge

Posted by Danushka Menikkumbura <da...@gmail.com>.
Have you created your JMS session with ack mode Session.CLIENT_ACKNOWLEDGE?

Thanks,
Danushka

On Mon, Jul 25, 2011 at 4:13 PM, Emir Ibrahimbegovic <
emir.ibrahimbegovic@gmail.com> wrote:

> Hello,
>
> I'm trying to download messages from my QPID queue without acknowledging
> them. Even though I don't acknowledge them, they still get downloaded from
> the queue. How can I check is my QPID queue setup with auto acknowledge(is
> there something like that)?
>
> Thanks,
> E
>

Re: Session auto acknowledge

Posted by Emir Ibrahimbegovic <em...@gmail.com>.
Thanks Gordon,

I found this example, it might be useful to someone else trying to do the
same thing :

http://www.novell.com/documentation/extend52/Docs/help/MP/jms/tutorial/pointToPoint-1.htm#browser

Best Regards,
E

On Tue, Jul 26, 2011 at 12:53 PM, Gordon Sim <gs...@redhat.com> wrote:

> On 07/26/2011 07:44 PM, Emir Ibrahimbegovic wrote:
>
>> Hi Gordon,
>>
>> When I say download, I probably mean "dequeue" because I'm wasn't sure
>> which
>> was the right term to use here. My goal was to inspect the message content
>> without any de-queueing occurring.
>>
>> Do you want to browse messages, i.e. see what is in the queue without
>> actually removing the messages? - This is exactly what I want.
>>
>
> In JMS you can use a QueueBrowser (see http://download.oracle.com/**
> javaee/1.4/api/javax/jms/**QueueBrowser.html<http://download.oracle.com/javaee/1.4/api/javax/jms/QueueBrowser.html>
> ).
>
> You can also specify 'mode: browse' in the address (see section 2.4.3.3 of
> http://qpid.apache.org/books/**0.10/Programming-In-Apache-**
> Qpid/html/ch02s04.html#**id2728030<http://qpid.apache.org/books/0.10/Programming-In-Apache-Qpid/html/ch02s04.html#id2728030>
> ).
>
>
> ------------------------------**------------------------------**---------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.**apache.org<us...@qpid.apache.org>
>
>

Re: Session auto acknowledge

Posted by Gordon Sim <gs...@redhat.com>.
On 07/26/2011 07:44 PM, Emir Ibrahimbegovic wrote:
> Hi Gordon,
>
> When I say download, I probably mean "dequeue" because I'm wasn't sure which
> was the right term to use here. My goal was to inspect the message content
> without any de-queueing occurring.
>
> Do you want to browse messages, i.e. see what is in the queue without
> actually removing the messages? - This is exactly what I want.

In JMS you can use a QueueBrowser (see 
http://download.oracle.com/javaee/1.4/api/javax/jms/QueueBrowser.html).

You can also specify 'mode: browse' in the address (see section 2.4.3.3 
of 
http://qpid.apache.org/books/0.10/Programming-In-Apache-Qpid/html/ch02s04.html#id2728030).

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Re: Session auto acknowledge

Posted by Emir Ibrahimbegovic <em...@gmail.com>.
Hi Gordon,

When I say download, I probably mean "dequeue" because I'm wasn't sure which
was the right term to use here. My goal was to inspect the message content
without any de-queueing occurring.

Do you want to browse messages, i.e. see what is in the queue without
actually removing the messages? - This is exactly what I want.

Thanks,
Emir

On Tue, Jul 26, 2011 at 5:39 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 07/25/2011 11:43 AM, Emir Ibrahimbegovic wrote:
>
>> I'm trying to download messages from my QPID queue without acknowledging
>> them. Even though I don't acknowledge them, they still get downloaded from
>> the queue. How can I check is my QPID queue setup with auto acknowledge(is
>> there something like that)?
>>
>
> When you say 'download' do you mean deliver or dequeue?
>
> For acknowledged transfer, the broker will deliver a message to a consumer.
> That message will not then be available to another consumer. The first
> consumer can then acknowledge the message allowing the broker to actually
> dequeue it permanently. However if the first consumers session fails or
> closes before the message is acknowledged the broker will make it available
> for other consumers.
>
> What is it that you want to happen? Do you want to browse messages, i.e.
> see what is in the queue without actually removing the messages? Or do you
> want the library to automatically acknowledge, but it appears not to be
> doing so?
>
> It's not clear to me what the exact problem is.
>
> ------------------------------**------------------------------**---------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.**apache.org<us...@qpid.apache.org>
>
>

Re: Session auto acknowledge

Posted by Gordon Sim <gs...@redhat.com>.
On 07/25/2011 11:43 AM, Emir Ibrahimbegovic wrote:
> I'm trying to download messages from my QPID queue without acknowledging
> them. Even though I don't acknowledge them, they still get downloaded from
> the queue. How can I check is my QPID queue setup with auto acknowledge(is
> there something like that)?

When you say 'download' do you mean deliver or dequeue?

For acknowledged transfer, the broker will deliver a message to a 
consumer. That message will not then be available to another consumer. 
The first consumer can then acknowledge the message allowing the broker 
to actually dequeue it permanently. However if the first consumers 
session fails or closes before the message is acknowledged the broker 
will make it available for other consumers.

What is it that you want to happen? Do you want to browse messages, i.e. 
see what is in the queue without actually removing the messages? Or do 
you want the library to automatically acknowledge, but it appears not to 
be doing so?

It's not clear to me what the exact problem is.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org