0
votes

I'm more used to Service Bus Queue but have challenges when using it with Azure Function App.

We have Azure Function App which reads data from Service Bus Queue through ServiceBugTrigger. 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.

My queue message lock duration is set to 3min (which is enough for my execution, I would say more than my requirement). 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. 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.

1
What's the duration of your function execution? If it's more than 5 minutes, there's your answer.Sean Feldman
Function execution time is hardly 30 seconds. I conclude it through app insight.DSA
Next is to verify what's bthe MaxLockDuration on the entity.Sean Feldman
It's set to 3min.DSA
What's the delivery count on the messages that get lock lost exception? Are they getting dead-lettered?Sean Feldman

1 Answers

0
votes

This happens when your maxAutoRenewDuration is more than the lock duration at servicebus side. 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

You can update it from portal or service bus explorer