Yes, you can use the following options (default values provided) to control the failover transport connector.
initialReconnectDelay = 10; maxReconnectDelay = 1000 * 30; backOffMultiplier = 2; useExponentialBackOff = true; maxReconnectAttempts; //indefinite reconnect attempts In this example, the failover will try 5 times to connect to the broker, then returns control to the client by throwing an exception if it cannot connect. failover://(tcp://localhost:61616)?maxReconnectAttempts=5 Joe Get a free ActiveMQ user guide @ http://www.ttmsolutions.com nabbleuser2008 wrote: > > Hi Joe, > > Thank you for your reply. Sorry it took me such a long time to reply. > > We're using 5.2 version. And, Yes, we use failover transports. Do you > think the use of failover transport make it hang under this situation ? > Any suggestions how to avoid it while keeping failover transports ? > > Thank you very much. > > > > > Joe Fernandez wrote: >> >> FWIW, I am using 5.1 and my createTopicConnection doesn't hang; it hurls >> a ConnectException if the target broker is not running. >> >> What version of AMQ are you using? >> >> Are you by any chance using failover transports? >> >> Joe >> www.ttmsolutions.com >> >> >> >> nabbleuser2008 wrote: >>> >>> I would have told this is a problem others would have run into also. Or, >>> am I doing something wrong ? >>> >>> In my system, createTopicConnection() call hangs when the broker is not >>> reachable, for example, when it is down. >>> >>> Appreciate any help. >>> Thank you. >>> >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Specifying-a-timeout-value-for-createTopicConnection%28%29-method-tp18368943p20486733.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.