qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: client::Connection::registerFailureCallback
Date Wed, 18 Mar 2009 09:04:12 GMT
Ted Ross wrote:
> I want to use Connection::registerFailureCallback (in the client) to 
> receive notification that my connection has been dropped.  I can find no 
> use of this feature anywhere in the qpid c++ code.
> 
> My concern is that only one callback can be registered per connection.  
> Subsequent registrations overwrite earlier ones.  Is this feature 
> intended for a particular purpose or is it available for general use?  I 
> don't want some future implementation to step on my callback (or vice 
> versa).

My personal recommendation would be to not use that callback.

If you have a SubscriptionManager running it will throw TransportFailure 
in the event that the connection is lost. (A call to any of the session 
methods will do likewise and if you are waiting on a Completion you will 
be woken up with the same exception thrown).

If the connection is closed due to an explicit error then you will get a 
ConnectionException subclass thrown.



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


Mime
View raw message