Hi Jiri, The C++ API will throw exceptions when errors occur. There's a very brief example in http://qpid.apache.org/books/0.10/Programming-In-Apache-Qpid/html/index. html section 2.1
-Steve -- Steve Huston, Riverace Corporation Total Lifecycle Support for Your Networked Applications http://www.riverace.com > -----Original Message----- > From: Jiri Krutil [mailto:j...@krutil.com] > Sent: Friday, June 17, 2011 8:56 AM > To: users@qpid.apache.org > Subject: How to detect connection shutdown or channel error? > > > Hi > > I'm trying to understand how to detect AMQP connection and channel > (session) errors in the C++ messaging API. > > As far as I can tell, there is no mechanism for registration > of client > on-error callbacks in the API. > > Since the API only allows synchronous messages receiving > (there are no > message listeners), I guess one can be safe in assuming that all is > well as long as no exceptions are thrown by the API functions called > from the client app. Only then should one become suspicious and > perhaps verify the connection and session status. > > Is that assumption correct? If yes, what is the right way to > check the > connection and session status? Is it sufficient to check the > result of > Connection::isOpen() and Session::hasError()? > > Any help is much appreciated. > > Cheers > Jiri > > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:users-subscr...@qpid.apache.org > > --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscr...@qpid.apache.org