Are you asking about a C++ client? Why can't you apply the same technique as 
you're doing with Python?

If you get a TTransportException, the right thing to do is to close and discard 
the transport as it may no longer be in a reliable state, then try again if so 
desired (ideally with some logic to prevent infinite retry loops in a 
non-intermittent failure scenario).

Another way of asking, what is the hassle you're encountering that seems 
specific to C++?
________________________________________
From: Matthew Chambers [[email protected]]
Sent: Monday, June 18, 2012 2:55 PM
To: [email protected]
Subject: Thrift C++ question

Anyone have a good way to retry an RPC on another connection if the
client side service object fails with a TTransportException or socket
error?

In python its easy, I just bring up a new TSocket, Protocol, Transport,
and Service on a different node and call the same function with the same
args.  Users never even know a server just died or was restarted.  With
C++ its proving to be more of a hassle.

-Matt

Reply via email to