I currently have an Event Grid-triggered Azure Function which executes whenever blobs are uploaded to a specific storage account. This will not scale as larger and larger blobs are uploaded. There is also the potential for "losing" messages if the Function ack's them but fails for some reason downstream.
A message queue would allow for buffering so the Function doesn't exhaust memory, and allow for storage of messages until a confirmed completion occurs.
I'm looking for an example of a PULL pattern where the Function processes queue messages on its own terms.
Thinking:
- When blobs are uploaded to the Storage Account,
- Event Grid write messages to a Storage Queue,
- Function polls the Storage Queue for unprocessed messages,
- Processes messages accordingly
- Upon success, dequeue's message
- If fail, retry message
Is this a valid approach or would I just use a Queue Storage
trigger for the Function and eliminate Event Grid from the scenario?