question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Delayed Acknowledgements when synchronously sending messages to Solace broker

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
xinchen10commented, Jun 11, 2019

Both suggestions make sense. I am looking at ways to give user more control on the protocol performatives.

0reactions
joerg-fischercommented, Jun 17, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found