According to Mike Z's comment, set LockDuration (default is 1, maybe up to 5 minutes) when you create a queue to prevent a timeout.
QueueDescription qd = new QueueDescription("MyQueue");
qd.LockDuration = ...
if (!namespaceManager.QueueExists("MyQueue"))
{
namespaceManager.CreateQueue(qd);
}
In addition, use RenewLock to prevent it from timing during a long process:
receivedMessage.RenewLock()
:
fooobar.com/questions/601529/...