From the docs from Message browsing functionality of Azure Service Bus, it says we get InvalidOperationException
when we try to access the Lock properties of a message. So we cannot access the lock duration and token details. Is there at least a way or workaround we get to know if it's been locked when we perform a peek
?
var client = MessagingFactory.CreateQueueClient("queueName");
BrokeredMessage message = client.Peek(); // Retrieves a locked message and its lock properties returns exception or old lock details depending upon its state