Hi @VvT ,
Thanks for the link to configuring publishing windows size. This is a useful additional setting, however, it doesn’t solve the requirements completely on its own as I understand it.
If you set the window to 1, then it will block you from sending more than one message at a time, but it will immediately unblock when you receive either an ack or a nak. So you might send your first message, then enter the API call for the second message. As soon as you receive an nack for the first message, the second message will be send and you can’t stop that from happening and intervene to re-send your first message instead.
Having said that, there’s a way to achieve the above behaviour with JCSMP as well. Thanks to @Aaron for pointing that out to me out-of-band. Solace has produced a code sample for this case that is making use of a CyclicBarrier to block the next send from happening until the response from the first one has been fully processed and any error handling taken care of.
solace-samples-java-jcsmp/src/main/java/com/solace/samples/jcsmp/features/BlockingSynchronousSendGuaranteed.java at master · SolaceSamples/solace-samples-java-jcsmp · GitHub