[rabbitmq-discuss] Catching channel disconnect

Valentino Volonghi dialtone at gmail.com
Wed Oct 15 09:53:40 BST 2008

Hash: SHA1

On Oct 15, 2008, at 1:08 AM, Ben Hood wrote:

> That patch addresses the issue of the connection to the other peer's
> socket being lost.
> I don't quite know what you mean with the failure of a tx_select
> command. How does this differ from anything any other pending RPC
> whose bottom half doesn't arrive because the underlying socket
> connection has died?

It doesn't, the tx_select just happens to be the one call that  
triggers the crash and restart
for my code which still doesn't include the patch.

> Sorry, I don't follow this either - are you saying that the socket
> abstraction in Erlang should try to reconnect a few times before
> telling higher level code that the underlying TCP connection has died?

No, I used erlang in the wrong way, scratch that. I meant the  
supervisor doesn't
provide a mechanism to restart the application using an exponential  
rather than simply as fast as possible as it's currently with the 3  

Clearly I don't need to implement backoff myself if erlang restarts a  
dying process
increasing the interval at each retry.

> If I you are meaning to say that retries are a concern of the client
> app rather than the client itself, then yes.
> From an architectural perspective, the role of the client is to
> provide a transparent and correct propagation of events between a
> client app and the broker. It should not try to address the problems
> of application flow that are best left to higher level code.

Yes, I fully understand that, I don't claim that the client API should  
provide a
mechanism to do exponential backoff. :). I was simply asking myself  
if, without
rewriting the supervisor behavior to include this new feature, there  
was another
way to achieve the same results. As a matter of fact it's possible and  
it's relatively
easy. I'm starting to learn to rely on supervisor restarts as part of  
the application
logic, it wouldn't surprise me if this is actually part of the erlang  

thanks again.

- --
Valentino Volonghi aka Dialtone
Now running MacOS X 10.5
Home Page: http://www.twisted.it

Version: GnuPG v1.4.9 (Darwin)


More information about the rabbitmq-discuss mailing list