solace - How do I know whether there is error when publishing message using JCSMP? -


i have following producer:

xmlmessageproducer producer = session.getmessageproducer(new jcsmpstreamingpublisheventhandler() { @override public void handleerror(string messageid, jcsmpexception cause, long timestamp) {     logger.error("error occurred when sending message {} ", messageid, cause); }  // method invoked persistent , non-persistent // messages. @override public void responsereceived(string messageid) {     logger.info("response received message {} ", messageid); } }); 

when calling producer.send() publish message topic, how know whether there error since responsereceived() not invoked direct messaging? message published asynchronously, when handleerror() of jcsmpstreamingpublisheventhandler called? how long should wait before can conclude there no error in publishing message?

thank you.

when calling producer.send() publish message topic, how know whether there error since responsereceived() not invoked direct messaging?

from documentation, direct messaging provides reliable—but not guaranteed—delivery of messages solace message bus consuming clients. used when extremely high message rates , extremely low latency required. trade off can discarded when congestion or system failures encountered. why there no acknowledgements sending of direct messages.

as message published asynchronously, when handleerror() of jcsmpstreamingpublisheventhandler called? how long should wait before can conclude there no error in publishing message?

for direct messages, there no acknowledgements of successful publish. when jcsmpsession.send() returns, means api has written data tcp send buffer. system failures such network disconnects happen after not detected, , message can lost.

for guaranteed messages, messages guaranteed spooled on appliance/vmr when responsereceived() invoked. if error occurs, handleerror() invoked.