Delayed Acknowledgements when synchronously sending messages to Solace broker
See original GitHub issueWhen synchronously sending messages to solace in a loop, I only get one callback per second. However, the strange thing is, if I first send a message with the callback set to null, I get the callbacks back-to-back without any delay.
for (int i = 0; i < 10; i++)
{
sender.Send(message,
(ILink l, Message m, Outcome o, object s) =>
{
Console.WriteLine(DateTime.Now.ToString("o") + ": " + o);
},
null);
}
// When first sending one message with callback set to null, we get the callbacks without delay
sender.Send(message, null, null);
for (int i = 0; i < 10; i++)
{
sender.Send(message,
(ILink l, Message m, Outcome o, object s) =>
{
Console.WriteLine(DateTime.Now.ToString("o") + ": " + o);
},
null);
}
I know that solace takes into account the batchable flag which is described in the AMQP spec (see: http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html)
This probably leads to the delayed acks. But why does sending an unacked message first have influence on the behaviour? Does this lead to batching messages in amqpnetlite? Is this the correct behaviour?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Guaranteed Messaging Acknowledgments - Solace
When an application sends a Guaranteed Message, the API handles delivery of the message to the event broker on behalf of the application....
Read more >Configuring Queues - Solace
Configuring a Message Redelivery Delay. When client applications are consuming messages from an event broker, they may occasionally encounter ...
Read more >Delayed Delivery - Solace
Delayed delivery allows you to introduce a time delay between the time when a message is published to the event broker and the...
Read more >Acknowledging Messages Received by Clients - Solace
For JCSMP, acknowledgments are sent at different times depending on whether the message is received asynchronously or synchronously:.
Read more >Message Spooling - Solace
On reaching this maximum, no more messages are delivered to clients until some clients return acknowledgments back to the event broker, or they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Both suggestions make sense. I am looking at ways to give user more control on the protocol performatives.
In the meantime, I made a modification to the WriteDelivery method in the session class to set batchable to false. I can confirm that now everything works as expected and the receiver does no longer wait for more messages to arrive before sending a disposition frame.