JCSMP send timeout?
With the JCSMP api, the XMLMessageProducer.send(...) method blocks while the client is reconnecting to the broker. In a situation where the broker is unavailable for a while and the client is continually reconnecting, is there any way (or common practice) to implement a timeout on the send? I'd like to be able to fail or maybe buffer the message locally so that my application thread can proceed.
Answers
-
Hello @petegehrman , The default behavior is to try 3 times to reconnect with 3 sec timeout and exit (if my memory serves right). The common practice is for clients to retry for specific duration and log an exception.
Solace client connect/reconnect properties are discussed here:
https://docs.solace.com/Solace-PubSub-Messaging-APIs/API-Developer-Guide/Configuring-Connection-T.htm0