qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Dennis <jden...@redhat.com>
Subject Re: Processing then acknowledging message from broker.
Date Mon, 31 Aug 2009 17:15:51 GMT
On 08/31/2009 12:33 PM, Jason Jones wrote:
> Hello,
> I am interested in writing a message consumer that cannot tolerate
> message loss. In the event that the message consumer crashes while
> processing a message I want the consumer to be able to restart and
> process the same message that it was working on when it crashed. I am
> assuming that it is possible to receive a message, while leaving on the
> broker, then process it, and then acknowledge to the broker that the
> message was processed thus removing it from the queue. Can someone
> explain and provide an example of how to receive a message from the
> broker, then process the message, and then acknowledge the message? If
> it doesn't work this way can you explain to me then how to implement
> this functionality?

This is how AMQP clients already work. You read a message and then you 
"accept" the message after having fully processed it. When you accept 
the message you're telling the broker you're done with it.

You didn't say which language you're using, the symbol names are 
slightly different, but you'll want to look for "accept" in the symbol 
name. In C++ look for accept(), acceptMode, getUnaccepted(), etc. Also 
checkout acquireMode and acquire*, they may also be of use to you.

John Dennis <jdennis@redhat.com>

Looking to carve out IT costs?

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

View raw message