ReceiveDeferredMessageAsync Method - Failed to lock one or more specified messages. Either the message is already locked or does not exist (MessageNotFound) #415
await using var clientDel = new ServiceBusClient(queueConnectionString);
// create a receiver that we can use to receive and settle the message
ServiceBusReceiver receiverLog = clientDel.CreateReceiver(queueName);
// the received message is a different type as it contains some service set properties
ServiceBusReceivedMessage receivedMessage = await receiverLog.ReceiveDeferredMessageAsync(fetchedSequenceNumber).ConfigureAwait(false);
// complete the message, thereby deleting it from the service
await receiverLog.CompleteMessageAsync(receivedMessage);
Actual Behavior
Returns exceptions "Failed to lock one or more specified messages. Either the message is already locked or does not exist (MessageNotFound)"
Removes the message from queue before CompleteMessageAsync is invoked
Expected Behavior
Should return deffered message w.r.t to the sequence number passed
Consume the message and remove from queue be invoking CompleteMessageAsync
Description
Actual Behavior
Expected Behavior