qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: What exactly does Session::sync()?
Date Mon, 27 Jun 2011 15:03:43 GMT
On 06/27/2011 03:34 PM, jkrutil wrote:
>
> Gordon Sim wrote:
>>
>> It waits for all pending async operations to be confirmed by the broker as
>> completed.
>>
>
> If a session sync fails because the broker failed to confirm some of the
> pending operations, can the caller find out what exactly went wrong, perhaps
> to be able to retry?

The sync() call will fail either because of some error in processing one 
of the commands or because the client gets disconnected.

In both cases you would get an exception that would indicate the 
problem. In the latter case you can retry (it would happen only after 
the configured automatic retry failed or if automatic retry was 
disabled). In the former case at present you need to create a new session.

> Is it possible to identify individual messages that were not published,
> acknowledgements that were not delivered, etc?

Yes, you should be able to call Sender::getUnsettled() and 
Session::getUnsettledAcks() to determine which of the pending async 
operations remained in-doubt. (The operations will be confirmed in order).

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


Mime
View raw message