You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rabih M <ra...@gmail.com> on 2017/03/14 14:23:32 UTC
[Qpid-Proton C++] detecting only connection errors
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?
Best regards,
Rabih
Re: [Qpid-Proton C++] detecting only connection errors
Posted by Andrew Stitcher <as...@redhat.com>.
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