qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Jones <jason-jo...@verizon.net>
Subject Re: Processing then acknowledging message from broker.
Date Mon, 31 Aug 2009 17:25:49 GMT
John thanks for replying.  I am using the C++ QPID client library.  I am 
using the SubscriptionManager and MessageListener classes to receive a 
message.  So are you saying that when the method 
MessageListener::received() is called the message is received, but still 
on the queue in the broker, then after MessageListener::received() 
returns the message is acknowledged and removed from the queue?

Thanks,
Jason Jones

John Dennis wrote:
> 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.
>
>
>


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


Mime
View raw message