To try and mitigate any hangs that may come about during problems with ActiveMQ connectivity in my application, I'm looking at adding the following parameter to my broker connection string within my application:
?transport.requesttimeout=10000
According to this resource, this looks as if it will help deal with these incidents.
However, I cannot seem to get this to work with my current failover connection string, which looks like this:
failover:(tcp://masterbroker:61616,tcp://slavebroker:61616)?keepAlive=true
Adding it in thusly:
failover:(tcp://masterbroker:61616,tcp://slavebroker:61616)?keepAlive=true&transport.requesttimeout=10000
Or, alternatively like this:
failover:(tcp://masterbroker:61616?transport.requesttimeout=10000,tcp://slavebroker:61616?transport.requesttimeout=10000)?keepAlive=true
... both seem to cause NMS exceptions or failures to connect.
This may seem a relatively trivial question, but how can I specify transport specific directives within this type of connection string?