[rabbitmq-discuss] channel.flow in pyampqlib

mabrek mabrek at gmail.com
Thu Sep 30 19:34:12 BST 2010


On 09/30/2010 09:18 PM, Matthias Radestock wrote:
> On 29/09/10 10:09, mabrek wrote:
>> Java client uses blocking IO. It would hang on writing to server
>> that throttles producers.
>>
>> Do you have any plans to switch java client to non-blocking IO
>> (NIO) and introduce timeouts in content sending methods?
>
> you could try setting a timeout on the socket with setSoTimeout. One
> place to do that is by overriding
> http://www.rabbitmq.com/releases/rabbitmq-java-client/v2.1.0/rabbitmq-java-client-javadoc-2.1.0/com/rabbitmq/client/ConnectionFactory.html#configureSocket(java.net.Socket)

It doesn't work. setSoTimeout affects only read timeout. There is no write timeout in java blocking sockets. Attempt to write to stuck socket may result in hanging up to 30min (last tcp retransmit attempt on linux).

Regards,
Anton Lebedevich.


More information about the rabbitmq-discuss mailing list