简体   繁体   English

Azure Function App中的服务总线队列锁定令牌过期错误

[英]Service Bus Queue Lock Token Expired Error in Azure Function App

I'm more used to Service Bus Queue but have challenges when using it with Azure Function App. 我比较习惯使用Service Bus Queue,但是将其与Azure Function App一起使用时会遇到挑战。

We have Azure Function App which reads data from Service Bus Queue through ServiceBugTrigger. 我们有Azure Function App,它通过ServiceBugTrigger从Service Bus队列读取数据。 Per this link , Azure Function App manage Queue message PeekLock internally (at the queue trigger and function execution end), we do not require to Complete() message at the end of the process. 通过此链接 ,Azure Function App在内部(在队列触发器和函数执行结束时)内部管理队列消息PeekLock,我们不需要在过程结束时使用Complete()消息。

My queue message lock duration is set to 3min (which is enough for my execution, I would say more than my requirement). 我的队列消息锁定持续时间设置为3min(这足以执行我的请求,比我的要求还多)。 I also applied other required parameters to treat message well like, 我还应用了其他必需的参数来很好地处理消息,例如,

"serviceBus": {
    "maxAutoRenewDuration": "00:05:00",
    "maxConcurrentCalls": 10,
    "prefetchCount": 0
  }

I am getting LOCK DURATION EXPIRED error frequently with this implementation. 在此实现中,我经常收到LOCK DURATION EXPIRED错误。 Really no idea what's happening here, Any clue? 真的不知道这里发生了什么,有任何线索吗?

I am used to Service Bus Queue and aware with each parameter function. 我习惯了服务总线队列,并且了解每个参数功能。 Also, have configured each parameter per requirement. 另外,已根据要求配置了每个参数。

This happens when your maxAutoRenewDuration is more than the lock duration at servicebus side. 当maxAutoRenewDuration超过servicebus端的锁定持续时间时,就会发生这种情况。 You should check the lock duration specified at Service bus queue side. 您应该检查在服务总线队列侧指定的锁定持续时间。 Ensure it is greater or equal to maxAutoRenewDuration specified in your azure function 确保它大于或等于您的azure函数中指定的maxAutoRenewDuration

You can update it from portal or service bus explorer 您可以从门户或服务总线资源管理器更新它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM