You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by vivek agarwal <ko...@gmail.com> on 2010/08/16 14:58:21 UTC
Query regarding asynchronous acknowledgments
Hi,
Do we have a API for direct AMQP over Apache Qpid, instead of going through
JMS?
Also, I wanted to enquire if its implements AMQP .10 fully.
I have a very specific use-case, where a consumer may consume a message, and
acknowledge it after a long processing. So can it be done without keeping
the Session object ( through which I received the message) open?
Thanks,
Vivek
Re: Query regarding asynchronous acknowledgments
Posted by Rafael Schloming <ra...@redhat.com>.
vivek agarwal wrote:
> So, do you mean that in acknowledging messages which are in exclusive
> queues, I dont need to keep the same session/connection open?
>
> Could you please elaborate it more, or point me to a useful resource.
What I mean is that if a consumer didn't keep the same
session/connection, then the messages that were not yet acknowledged
would be requeued back to the private queue and would therefore be
guaranteed to come back to you the next time you connected rather than
going to some other consumer.
In other words, by using a private queue for each consumer you would
never have duplicate acquisition (i.e. the same message would never be
sent to more than one consumer). However obviously there would be
duplicate transmissions to a single consumer and you'd need to detect
and handle that.
--Rafael
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Query regarding asynchronous acknowledgments
Posted by vivek agarwal <ko...@gmail.com>.
So, do you mean that in acknowledging messages which are in exclusive
queues, I dont need to keep the same session/connection open?
Could you please elaborate it more, or point me to a useful resource.
Thanks,
Vivek
On Mon, Aug 16, 2010 at 7:14 PM, Rafael Schloming <ra...@redhat.com>wrote:
> vivek agarwal wrote:
>
>> Hi,
>>
>> Do we have a API for direct AMQP over Apache Qpid, instead of going
>> through
>> JMS?
>> Also, I wanted to enquire if its implements AMQP .10 fully.
>>
>> I have a very specific use-case, where a consumer may consume a message,
>> and
>> acknowledge it after a long processing. So can it be done without keeping
>> the Session object ( through which I received the message) open?
>>
>
> You can't do this directly in pre 1-0 versions of the protocol. The
> 0-8/0-9/0-10 protocols all model acknowledgment as something that happens
> within the same context as the message transfer, and if that context goes
> away (i.e. the connection/session dies or is closed), then the message is
> requeued.
>
> You can achieve the equivalent of this by ensuring that each consumer has
> an exclusive queue. For topics this is easy, you just have durable queues
> bound into the exchange. For a shared queue scenario you'd need extra logic
> (either in your clients or in a separate process) to shuffle messages from
> the shared queue into the exclusive queues.
>
> --Rafael
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
Re: Query regarding asynchronous acknowledgments
Posted by Rafael Schloming <ra...@redhat.com>.
vivek agarwal wrote:
> Hi,
>
> Do we have a API for direct AMQP over Apache Qpid, instead of going through
> JMS?
> Also, I wanted to enquire if its implements AMQP .10 fully.
>
> I have a very specific use-case, where a consumer may consume a message, and
> acknowledge it after a long processing. So can it be done without keeping
> the Session object ( through which I received the message) open?
You can't do this directly in pre 1-0 versions of the protocol. The
0-8/0-9/0-10 protocols all model acknowledgment as something that
happens within the same context as the message transfer, and if that
context goes away (i.e. the connection/session dies or is closed), then
the message is requeued.
You can achieve the equivalent of this by ensuring that each consumer
has an exclusive queue. For topics this is easy, you just have durable
queues bound into the exchange. For a shared queue scenario you'd need
extra logic (either in your clients or in a separate process) to shuffle
messages from the shared queue into the exclusive queues.
--Rafael
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org