[PATCH] rabbitmq-erlang-client: Improve connection failure detection with direct connections

29 views
Skip to first unread message

christoph...@gmail.com

unread,
Oct 17, 2014, 5:28:42 AM10/17/14
to rabbitm...@googlegroups.com

Hi,

With network connections, one obvious way to detect errors is to monitor the connection and the channel processes. So if the connection with RabbitMQ is lost or if the channel's writer dies, it is easy to detect the error and restart the processes.

But this does not work with direct connections. Of course, workarounds can be found. But, IMHO, it is more elegant to deal with these errors in the same way, regardless of the type of connection used.

The attached patches fix this issue.

--

Christopher Faulet

0001-Link-a-channel-with-its-writer-when-a-direct-connect.patch
0002-Detect-connection-failure-when-a-direct-connection-i.patch

Simon MacMullen

unread,
Oct 20, 2014, 12:13:07 PM10/20/14
to christoph...@gmail.com, rabbitm...@googlegroups.com
On 17/10/14 10:28, christoph...@gmail.com wrote:
> But this does not work with direct connections. Of course, workarounds
> can be found. But, IMHO, it is more elegant to deal with these errors in
> the same way, regardless of the type of connection used.

Thanks. Nice spot on the writer linking to the wrong process.

I've merged this, with the change that the direct connection monitors
the remote direct channel supervisor, rather than the entire node. That
way the connection is considered down if someone invokes "rabbitmqctl
stop_app" at the far end, which I think make more sense (since all your
channels will die).

Thanks for your contribution.

Cheers, Simon

Reply all
Reply to author
Forward
0 new messages