How to setup the ack timer for guarantee messaging

Hi @alhung, Solace acknowledgement handling is highly tuned and it’s usually best not to change the settings you were accessing. The acknowledgement scheme is actually pretty simple from a client point of view: only acknowledge the message once you’re sure you’ve finished with it.

So, with your topic to queue mapping example, I recommend keeping it simple. Don’t use the SessionProperties you mention, leave them at the default. Then when you create your flow, set the ackmode to client:

 Flow = Session.CreateFlow(new FlowProperties()
                {
                    AckMode = MessageAckMode.ClientAck
                },
...

This stops the API sending aknowledgements automatically so you can send them when you need to by calling Flow.Ack:

  private void HandleMessageEvent(object source, MessageEventArgs args)
        {
            using (IMessage message = args.Message)
            {
                // Process the message.  You might want to put your delay here.
                // ACK the message
                Flow.Ack(message.ADMessageId);
               ...
            }
        }

See the SolaceSamples GitHub for more details, specifically the QueueConsumer.

The parameters you were accessing are low level API details of how acknowledgements are sent back to the broker, and are there primarily for performance tuning. Let’s get the basics working first :smiley: