AMQP ReceiverLink after accepting the message is not dequeueing the message in UI

382 Views Asked by At

I am publishing messages to a virtual topic and from there on to two queues. I am consuming the messages from one of the queue using ReceiverLink asynchronously.

ReceiverLink receiverLink = new ReceiverLink(
            _session, "recevier_link-1", new Source()
            {
                Durable = 1,
                Address = "MyQueue",
                Capabilities = new Symbol[] { new Symbol("Queue") }
            }, onReceiverAttached);

receiverLink.Start(20, (receiverLink, msg) => {
             
             var t = ProcessMessageAsync(receiverLink, msg); 
         } );
        receiverLink.SetCredit(10, CreditMode.Auto, 10);


public async Task ProcessMessageAsync(IReceiverLink receiver, Message message)
    {
           
            try
            {
             receiver.Accept(message);
            _logger.LogDebug("Accepted Message : {message}", message.Body.ToString());  

           
            }

            catch (Exception ex)
            {

            }
        await Task.Delay(1000);

    }

I am accepting the messages, but the dequeued count remains 0 in UI.

Queue Information

From the receiverlink API documentation, "Application acknowledges a message by calling Accept(Message), Reject(Message, Error), Release(Message) or Modify(Message, Boolean, Boolean, Fields) method."

Once the message is acknowledged, should the message be dequeued in UI?

Attaching the AMQP trace on consumer,

AmqpTrace

0

There are 0 best solutions below