You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajesh Khan <ra...@gmail.com> on 2013/01/29 18:58:11 UTC

How to batch Acknowledge messages

Because of the high throughput requirement of my application I have started
to use the .count property in my C# Qpid Receiver for a LV Queue.
I wanted to know how I can batch acknowledge the received messsages.
Currently I am using just two things after receiving messages
session.Sync(); followed by session.Acknowledge(); How could I batch
acknowledge say 20 messages ?

Re: How to batch Acknowledge messages

Posted by Gordon Sim <gs...@redhat.com>.
On 01/29/2013 06:35 PM, Rajesh Khan wrote:
> Are we not suppose to call that ?

What that method does is block until the server has done all outstanding 
work requested by that client session. There is nothing prohibiting you 
calling it, I am just curious as to why you are doing so.

If you want to block until the acknowledge() call is actually processed 
by the server you can use the optional parameter to that. (which is more 
or less equivalent to calling sync() after acknowledge().

Of course since sync() may block pending a roundtrip to the server, it 
may impact overall throughput. If you don't have a clear reason for 
using it, I would leave it out.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: How to batch Acknowledge messages

Posted by Rajesh Khan <ra...@gmail.com>.
Are we not suppose to call that ?

On Tue, Jan 29, 2013 at 11:38 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/29/2013 05:58 PM, Rajesh Khan wrote:
>
>> Because of the high throughput requirement of my application I have
>> started
>> to use the .count property in my C# Qpid Receiver for a LV Queue.
>> I wanted to know how I can batch acknowledge the received messsages.
>> Currently I am using just two things after receiving messages
>> session.Sync(); followed by session.Acknowledge(); How could I batch
>> acknowledge say 20 messages ?
>>
>
> Just call session.Acknowledge() every 20 messages. Btw, why are you
> calling session.Sync() before Acknowledge()?
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.**org<us...@qpid.apache.org>
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: How to batch Acknowledge messages

Posted by Gordon Sim <gs...@redhat.com>.
On 01/29/2013 05:58 PM, Rajesh Khan wrote:
> Because of the high throughput requirement of my application I have started
> to use the .count property in my C# Qpid Receiver for a LV Queue.
> I wanted to know how I can batch acknowledge the received messsages.
> Currently I am using just two things after receiving messages
> session.Sync(); followed by session.Acknowledge(); How could I batch
> acknowledge say 20 messages ?

Just call session.Acknowledge() every 20 messages. Btw, why are you 
calling session.Sync() before Acknowledge()?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org