On 06/17/2011 01:56 PM, Jiri Krutil wrote:
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()?
Yes, that should be sufficient. Any attempt to use a session on which an
AMQP level error occurred will result in the exception being thrown again.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]