Potential missing message during failover in a HA group

How many messages did you publish? How many messages ended up on the queue? That’s an easy way to check for loss…?

Can you share all your code? JCSMP persistent/Guaranteed publishing is non-blocking (to the broker). The send() call returns when the message is written to the socket. The confirmation of spooling on the broker comes asynchronously via the JCSMPStreamingPublishEventHandler.

If only doing failover testing, the API should have long enough reconnection parameters to allow the API to reconnect without throwing a Transport Exception. So that looks a bit strange to me. The API should block until the reconnection happens and then allow the message to be published on the backup. I’m also wondering why the Message ID is not available? Maybe this error is not related to a particular message, and just about the connection…?

And just a small point RE: terminology… the message is not “lost” if the broker returns a NACK (i.e. handleError())… the message is still inside the publisher application memory. The message can only be lost if the broker successfully acknowledges the message, and then loses it somehow. The point of Guarantee is only once you get the NACK… not the send() call returning.

Anyhow, share your code if you can for more help. Thanks!