0

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.

DSA
  • 720
  • 2
  • 9
  • 30

1 Answers1

0

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

Abbas Cyclewala
  • 549
  • 3
  • 10
  • >You should check the lock duration specified at Service bus queue side. Ensure it is greater or equal to maxAutoRenewDuration < I'm confused - this is exactly the opposite of the recommendation from @SeanFeldman here: https://stackoverflow.com/a/60381046/3073617 where he says "MaxAutoRenewDuration needs to be set to be at least longer than the MaxLockDuration" – Phil Seeman Mar 13 '21 at 15:10