Reputation: 406
I'm trying to create a bit of serverless architecture and I have a concern about using an Azure Function on a blob trigger.
I have Azure Function 1 that is a Queue Trigger that gets a message to run a request to an API that generates a file and places it in blob storage, the function does not wait for a response. Then I would like to have created an Azure Function 2 that will send that blob/link to a second place. However I was reading about how a blob trigger is not guaranteed to trigger for every blob, I believe "best effort" is the phrase they use in the docs.
My second idea given the "best effort" issue was to have the first function wait for a response and place a message in the queue for a new version of the second function, using a queue trigger instead of a blob trigger.
I'm wondering if this is worth the trade off of making the Queue Trigger 1 wait for a response, and if the "best effort" risk worth the change. Or if there is a better design out there I'm happy to hear it.
Upvotes: 0
Views: 1498
Reputation: 10871
Thanks for the suggestion @peter bons
You may use Event Grid instead of the Blob storage trigger to get notifications whenever something is changed for the following scenarios: • Blob storage accounts • High scale • Minimizing cold-start delay
It has built-in support for events coming from storage blobs and resource groups. For that we need to create a event grid subscription , need storage account and function app endpoint .
Steps :
Login to Azure portal and create an endpoint
Create a Function App
So, for creating an endpoint, we will use Function App with trigger type as Azure Event Grid Trigger.
In the storage account that you have(if not create one) ,create even grid subscription .
Upload file in blob and notice the notifications .
See this for more details
Other references:
Upvotes: 1