Prevent Queue subscribing application to receive another message until ACK is sent
I have a consuming application using the solace .NET client API which binds to an exclusive queue.
May aim is to process messages in order without any loss.
Suppose I have the following messages on the Queue: msg1, msg2, and msg3. Let's say I have received msg1 and am processing it on the FlowMessageHandler in my application. However, the processing time may be really long due to the fact that it is dependent on many other external services which DB connections, REST APIs etc. it is also possible that one of these services may not be available.
Is there a time limit on how long I can keep retrying to connect to these services in the FlowMessageHandler?
If there is or it is not recommended to hang in the handler for too long, then if I exit the handler without ACKing msg1 is there any way to prevent sending msg2 until msg1 is ACKed?
Can it be done via the max-delivered-unacked-msgs-per-flow option by setting it to 1? if so can this be set via the .NET client API?
If I exit the handler without ACKing msg1 what will happen if the queue receives a msg4? will I get sent msg1 again?
Any help would be greatly appreciated.
Thank you very much