Hi All,
I want to use queueClient.ReceiveBatch(IEnumerable<long>) to remove brokenmessage from deadletter queue,below is my
code:
bool success = false;
if(messagingFactory == null)
throw new NullReferenceException("messsagingFactory is null");
try
{
QueueClient client = messagingFactory.CreateQueueClient(QueueClient.FormatDeadLetterPath(queuepath),
ReceiveMode.ReceiveAndDelete);
if (sequenceNumbers != null)
{
client.ReceiveBatch(sequenceNumbers);
}
return true;
}
catch(Exception ex)
{
throw ex;
}
when above codes are executed,below exceptions is thrown:
MessageNotFoundException:Failed to lock one or more specified messages.The message doesn't exist.
but I check that the SequenceNumbers are as the same as the brokenMessage. why throw this exception?