You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Jiri Krutil <ji...@krutil.com> on 2011/07/29 09:23:35 UTC
Connection error diagnostics in C++ client
Hi
I'm trying to figure out how to distinguish between different types of
exceptions thrown by Connection::open() in C++ messaging client v0.7.
I need to be able to tell into which of these two categories does the
connection error belong:
1. Retry makes sense: Remote host unreachable or down, broker not
listening on specified port (broker down).
2. Retry does not make sense: Broker listening on specified host and
port, but virtual host is incorrect or authentication failed.
Any hints?
Cheers
Jiri
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Connection error diagnostics in C++ client
Posted by Gordon Sim <gs...@redhat.com>.
On 07/29/2011 08:23 AM, Jiri Krutil wrote:
> Hi
>
> I'm trying to figure out how to distinguish between different types of
> exceptions thrown by Connection::open() in C++ messaging client v0.7.
>
> I need to be able to tell into which of these two categories does the
> connection error belong:
>
> 1. Retry makes sense: Remote host unreachable or down, broker not
> listening on specified port (broker down).
> 2. Retry does not make sense: Broker listening on specified host and
> port, but virtual host is incorrect or authentication failed.
>
> Any hints?
Generally the intention is that qpid::messaging::TransportFailure is
thrown to indicate connectivity problems as opposed to more explicit
semantic errors.
However there is a bug such that this is not always the case in
Connection::open(). Some connectivity errors (such as name resolution
failure) will not result in a TransportFailure, but in a generic
MessagingException. Conversely authentication errors are at present
indistinguishable from transport failures, signalled as they are
incorrectly as TransportFailures.
I've created https://issues.apache.org/jira/browse/QPID-3382 to track this.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org