[rabbitmq-discuss] how do I change the connection timeout in the java client

Mark Geib mark.geib at echostar.com
Thu Nov 5 16:15:22 GMT 2009


Thanks for the reply, darn.

Have you looked at XSocket. We have used it extensively, and it is very
flexible...

Mark.

Matthias Radestock wrote:
> Mark,
> 
> Mark Geib wrote:
>> I need to be able to change the timeout for making a new connection to a
>> broker to a smaller time. I have not been able to find out how to do
>> this for the rabbitmq java client. Is there a way.??
> 
> Unfortunately javax.net.SocketFactory and its default implementations in
> the JDK, which is what the Java client is using, do not appear to
> support the setting of a connection timeout.
> 
> You could write your own implementation of the SocketFactory interface
> that creates sockets with a connection timeout, and supply instances of
> that implementation to com.rabbitmq.client.ConnectionFactory's
> setSocketFactory method.
> 
> 
> Regards,
> 
> Matthias.
> 

-- 
Principal Engineer
Cheyenne Software Engineering
mark.geib at echostar.com / 35-215

PGP fingerprint:6DFC 389D 9796 0188 92E5 58F5 34C5 6B47 D091 76FD




More information about the rabbitmq-discuss mailing list