Hi! Great post!
However, I haven't understood what is the benefit to use of EventGrid trigger instead of Blob trigger? It seems that I could create a blob trigger in a function and implement the same.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@bastyuchenko Thanks for the feedback. I assigned the case for further investigation.
@bastyuchenko
The blob trigger polls the container for changes, which means you can wait up to 10 minutes for the trigger to run. The EventGrid trigger is instantaneous, so it depends on your needs. Another option for scenarios where you are adding blobs to the container yourself is to also write a message to an Azure Storage queue with the blob URL. The queue trigger will also pick up the change and trigger faster than blob.
Hope that helps.
Glenn.
Hi @ggailey777
The blob trigger polls the container for changes, which means you can wait up to 10 minutes for the trigger to run. The EventGrid trigger is instantaneous, so it depends on your needs.
Thank you! I got it and it was really useful information for me.
Another option for scenarios where you are adding blobs to the container yourself is to also write a message to an Azure Storage queue with the blob URL. The queue trigger will also pick up the change and trigger faster than blob.
Sorry but I haven't understood this scenario. Why does a message will be written if I add blob to the container? Maybe I lost something. Could you please explain?
@bastyuchenko my only point was that if you want faster function processing of uploaded blobs without using Event Grid, you can have both queue and a blob container in Azure Storage. After you successfully upload to the blob container, you can write a message to the queue that contains the URL of the blob. Your function can trigger on the queue and use the URL in the message to access the uploaded blob in your function. This of course depends on the fact that you own the process that uploads the blob, otherwise your best bet is probably Event Grid (or live with the lag).
@ggailey777, thank you for explanation.
based on my understanding, the Event Grid take care of 'containers layer', which will detect the changes of blobs inside, namely the creation and deletion.
Blob trigger monitors the blocks of data inside
Most helpful comment
@bastyuchenko
The blob trigger polls the container for changes, which means you can wait up to 10 minutes for the trigger to run. The EventGrid trigger is instantaneous, so it depends on your needs. Another option for scenarios where you are adding blobs to the container yourself is to also write a message to an Azure Storage queue with the blob URL. The queue trigger will also pick up the change and trigger faster than blob.
Hope that helps.
Glenn.