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: [email protected] For additional commands, e-mail: [email protected]
