Reputation: 582
Application hang on connection, when the ActiveMQ is down.
URL: failover:(tcp://localhost:61616)?jms.useAsyncSend=true
Can I somehow proceed with each connection with failover and async to not block thread when trying to send the message?
Upvotes: 0
Views: 621
Reputation: 18356
The failover transport will not buffer sends as that can lead to OOM issues so even in the case of configured async sends the send will block until there is a connection and the transport can get the data onto the wire. If you really want the send to not block until reconnection the failover transport does have a timeout option for send which will cause them to fail but then your application needs to be able to deal with failed sends and retries etc so there is no silver bullet here.
Upvotes: 2