qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stitcher <astitc...@redhat.com>
Subject Re: [Qpid-Proton C++] detecting only connection errors
Date Thu, 16 Mar 2017 15:33:47 GMT
On Tue, 2017-03-14 at 15:23 +0100, Rabih M wrote:
> Hello,
> 
> I am trying to implement a retry mechanism using proton. If the
> connection
> between the amqp peers is down or the remote peer itself is down, i
> would
> like to retry the current operation (send, receive...). A bit similar
> to
> the failover Url in JMS...
> 
> Therefore i would like to capture only the errors related to
> connection
> problems to trigger the retry.
> If I implement on_transport_error(), will I get only the connection
> error
> here? or will I receive other types of undesired errors too?

If you implement on_transport_error() you will see events for every
time the proton-c transport connection closes with an error condition
set.

I think this is only the underlying socket failures, but I'm not 100%
sure about that.

I think it would be reasonable to report a bug if you get other errors
reported here.

So try it, and if it doesn't work the way you expect, come back to the
list.

Note, you will probably have to set an idle timeout (heartbeat) to
ensure that you notice in a timely fashion when the peer is
disconnected, or the network goes away.

Andrew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message