You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Ethan.Lin" <yu...@163.com> on 2018/08/06 07:47:14 UTC

ActiveMQ-cpp-library 3.9.4 connection timeout

Dear readers,

I get a question when I'm using ActiveMQ-cpp-library 3.9.4 to connect to MQ
server, as described below:

It seems that the timeout parameters specified in URI of connection do not
take effect if MQ server does not exist. For example, I use the following
URI to connect to MQ server, 
"failover:(tcp://192.168.100.100:61616)?startupMaxReconnectAttempts=1&maxReconnectAttempts=1&maxReconnectDelay=10"
where 192.168.100.100 does not exist in the network. And I suppose that when
cms::Connection.start() is called, the connection will fail within 10ms and
throw an exception to my application. However, it blocks my application
about 42 seconds and then throw the exception. Whatever maxReconnectDelay is
set to any value, this start() function takes almost 42 seconds and the
returns.

Did anyone meet this question before? How do I set URI parameters that can
lead the start() to return within 1 second instead of 42 seconds? 

Thank you very much.




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html