I am using AMQPNetLite to send and receive AMQP messages from ActiveMQ brokers. I am new to this and would like to understand what I am doing wrong. I am following the example from the documentation as below.
var _receiverLink = new ReceiverLink(session, "Name", "QName");
_receiverLink.Start(10, (link, m) =>
{
link.Accept(m);
});
I am successfully receiving the message but using of
link.Accept(m);
does NOT remove the message from the queue. Can anyone please guide me what I am missing.
Edit: It works when I add a delay. The message is removed from the Queue.
Thread.Sleep(1000);
link.Accept(msg);