JCSMP send timeout?

petegehrman Member Posts: 43 ✭✭

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.