Windows Azure的MessageLockLostException [英] Windows Azure MessageLockLostException
问题描述
我在使用Azure的消息总线队列的问题。
I'm having issues with Azure Message Bus Queues.
我有MessageLockLostException抛出该请求的操作没有的0时01分10秒的超时时间分配内完成。分配给该操作的时间可能已经较长超时的一部分。
I'm having MessageLockLostException thrown and The request operation did not complete within the allotted timeout of 00:01:10. The time allotted to this operation may have been a portion of a longer timeout.
我已经把我的队列到ReceiveMode.PeekLock。
I've set my queue into ReceiveMode.PeekLock.
我也检查
if(message.LockedUntilUtc.Minute <= 1)
message.RenewLock();
为什么会出现这种情况,是什么导致锁给了呢?我是从那里你接收你有5分钟,默认情况下,点读某处。这个过程需要一点时间一般。我想续订锁但这不是工作太清楚了。
Why would this happen, what's causing the lock to give out? I was reading somewhere from the point where you Receive you have 5 minutes by default. This process takes a little longer usually. I wanted to renew the lock but this isn't working too well.
推荐答案
的<一个href=\"http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.queuedescription.lockduration.aspx\">LockDuration是队列的财产。通常,您在创建队列设置此。这是队列
级别属性,不能对邮件的基础改变。你读过什么,最有可能是说这个持续时间不能超过5分钟。默认值为1分钟,这就是为什么你面对的问题。以及为什么优70秒后面对它 - 我假设逻辑检查此条件下每10秒执行
The LockDuration is property of the Queue. You typically set this when you create the Queue. This is Queue
level property and cannot be changed on a message base. What you've read, most probably is saying that this duration cannot be longer than 5 minutes. The default value is 1 Minute, that's why you face issues. And why you face it 70 seconds later - I assume the logic for checking this conditions is executed every 10 seconds.
所以,我建议你创建或修改队列设置<一个href=\"http://msdn.microsoft.com/en-us/library/windowsazure/microsoft.servicebus.messaging.queuedescription.lockduration.aspx\">LockDuration物业为5分钟。然后,当工作<一个href=\"http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.brokeredmessage.renewlock.aspx\">RenewLock你的信息在适当的时候。
So I suggest that you create or modify your Queue to set LockDuration property to 5 minutes. Then, while working RenewLock of your message when appropriate.
这篇关于Windows Azure的MessageLockLostException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!