0

I am having two azure function one is http function and another one is queue trigger function. In http function i am adding a messasge to queue and in queue trigger processing it. When i log the message in queue trigger sometimes its triggering multiple times with the same message ? What will be the reason ?

Thanks in advance

Jaffer Sathick
  • 466
  • 1
  • 10
  • 21

1 Answers1

5

There might be several reasons. Without looking at the code, my guesses would be the following:

  • HTTP based function is invoked more than once. Can be verified by assigning either a unique message ID derived from the message properties and then de-duplicating using ASB's native de-dup.
  • Queue based function is not completing messages in time (lock duration time) and it becomes available again.

A few resources on message de-duplication you might find useful:

Sean Feldman
  • 23,443
  • 7
  • 55
  • 80
  • Its due to the second. I made lock time as 5 min and i think azure function will automatically resetlock time even if its more than 5 mins – Jaffer Sathick May 19 '17 at 10:41
  • Azure functions used under consumption plan cannot run longer than 5 mins Also, max lock duration ootb is 5 mins. Beyond that lock needs to be renewed or design needs to be changed. – Sean Feldman May 19 '17 at 13:11