[rabbitmq-discuss] Long timeout if server host becomes unreachable

Michael Klishin michael at rabbitmq.com
Tue Oct 8 15:05:03 BST 2013


On oct 8, 2013, at 5:48 p.m., Oleg Lyalikov <oleg.lyalikov at gmail.com> wrote:

> If "_socket" field is not private in SocketFrameHandler I could try overriding "close" method and invoke just _socket.close() - maybe that would help. But the field is private (maybe we can copy/paste the class and instantiate our new one but it does not look good - it would be better to just enhance existing functionality not to replace - there could be some problems with compatibility with newer versions of RabbitMQ client lib, RabbitMQ tests should be run regularly as our own tests, etc).

I understand the desire to avoid deploying a fork. However, it's already clear that the client
needs to be modified somehow and you have a way to reliably reproduce the problem (is this correct?)

Perhaps the fastest turnaround time would be for you to make some changes and try them out.
Once a solution that works is found, we will see if it can be incorporated into the mainline.

> By the way do you know why SocketFrameHandler#close method invokes "flush" first before making socket.close()?

Closing a connection on the application side involves sending connection.close to RabbitMQ.

> Is it ok in case of write timeout just do socket.close() without flush?

In case of a write timeout, it is (we won't be using the connection once that happens anyway, right?)

> As for modifying SocketFrameHandler so that it will use locks with timeouts - that could be possible but with the same drawbacks as the solution above.

(nods)

> Both workarounds require careful testing and time, we will think about it. But I'm hoping RabbitMQ library will provide functionality to set socket write timeout in the future.

You can help with that. Contributing does involve submitting a CLA but digital ones
are accepted.

> Could you provide some ticket link so that we can monitor its status?

rabbitmq bug tracker is not public but we accept issues that are filed on github, so I filed
one you can watch:

https://github.com/rabbitmq/rabbitmq-java-client/issues/11

MK



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131008/92c359bf/attachment.pgp>


More information about the rabbitmq-discuss mailing list