Ankush Jain
Ankush Jain

Reputation: 7049

Does Queue Trigged Azure Function trigger for older queue messages?

A simple question.

Suppose, I have thousands of messages in Storage Queue already. Now, I deploy a Queue Trigger Azure Function. Will it get triggered for existing items or It will trigger for only those items which are added at a later point.

Upvotes: 0

Views: 274

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136196

Will it get triggered for existing items or It will trigger for only those items which are added at a later point.

It will get triggered for existing items as well. Essentially the Function Runtime constantly polls the messages in a Storage Queue and the Function gets executed if any messages are found in the Queue. Since you already have messages in your Queue, your Function will be triggered and will process existing messages.

For more details on polling algorithm implemented by queue trigger, please see https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=csharp#polling-algorithm.

Upvotes: 2

Related Questions