0
votes

SQS from AWS has the concept where you have to explicitly say you've successfully processed the queue message before it's completely removed from the queue (I believe it's just "hidden" for a period of time, and comes back if you don't mark it as successfully processed).

How do azure functions behave when pulling messages off storage queues and there is an exception thrown during execution of the azure function? Does the message show up again in the queue?

2

2 Answers

4
votes

AFAIK, the message will show up again in the queue. The runtime only deletes the queue message when your Function successfully processes it.

Here is a similar issue, you could refer to it.

When the message is dequeued and passed to your function, it becomes invisible for a period of time (10 minutes). While your function is running this invisibility is maintained. If your function fails, the message is not deleted - it remains in the queue in an invisible state. After the visibilty timeout expires, the message will become visible in the queue again for reprocessing.

0
votes

As Joy said, the message is returned to the queue for processing again. One key consideration is that after five failed attempts at processing the message, the message will be moved to a poison queue.

https://docs.microsoft.com/en-us/sandbox/functions-recipes/queue-storage#poison-queue-messages-with-azure-storage-queue-triggers