0

I have One Event Grid topic where I publish my events and subscribe them by Azure function Event grid trigger.

In Event Subscription I configured Dead letter queue setting and store all undelivered events in blobs.

Could you please suggest me how to read/notify about those blobs entries.

Johan
  • 3,577
  • 1
  • 14
  • 28
Nitin Jain
  • 129
  • 1
  • 14
  • Have you tried [blobtrigger](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob#trigger---example), when a blob is created or updated, you can get blob content in function and do whatever you want. – Jerry Liu Oct 15 '18 at 09:38
  • Cant we use same Azure function event grid trigger to access of those blob storage used for dead letter queue and trigger tit once entries come into blob storage – Nitin Jain Oct 15 '18 at 14:10

2 Answers2

0

You would probably use Blob trigger instead of an Event grid trigger. Using blob trigger will run the function whenever a blob is added to a specified container.

In this case you can get notified whenever a new entry is added into a specified container.

Balasubramaniam
  • 371
  • 5
  • 14
  • Cant we use same Azure function event grid trigger to access of those blob storage used for dead letter queue and trigger tit once entries come into blob storage. – Nitin Jain Oct 15 '18 at 14:09
  • Event Grid trigger notify you about events that happen in publishers. A publisher is the service or resource that originates the event. You probably use blob trigger which will be much simpler – Balasubramaniam Oct 15 '18 at 14:20
  • Thanks you ! I changed my solution ! – Nitin Jain Oct 15 '18 at 19:52
  • @Balasubramaniam, Microsoft recommend not use blobTrigger and instead use event grid trigger .... – Thomas Oct 15 '18 at 20:27
  • @Thomas: In my scenario, I am using blob storage just to store dead letter queue events. I am looking how to notify or trigger when any events message goes into blob storage due to bad request response from Azure function event grid trigger. – Nitin Jain Oct 16 '18 at 07:36
  • @NitinJain The EventGridTrigger is an event driven push trigger (like is a HttpTrigger) in opposite to the BlobTrigger, where its "publisher" needs to scan changes in the storage container and based on that generates an event. I do recommend for your case to use an EventGridTrigger function with an input blob binding (path="{data.url}"). Note, that the EventGrid model guarantees a delivery & retrying of the event messages to the subscribers based on their subscriptions. Also, it is very simple to add another subscriber (e.g. EventHub) for streaming pipe and use an analytics job. – Roman Kiss Oct 16 '18 at 15:51
0

If you want to be notified when dead letter events are stored in the blob container, then create a new event grid subscription for that container (the one you configured for the dead letter events). The last piece of this article will show you how to do just that with a Logic App (but you can use a Function or any other valid handler as well): https://msdn.microsoft.com/en-us/magazine/mt829753.

dbarkol
  • 291
  • 2
  • 7
  • Sir, To test dead letter event is working properly or not I followed below steps. I have created one event grid topic which has event subscription to Azure function event gird trigger. To test dead letter queue I disabled Azure function and start publish events into Event grid topic. In log I finds event is published successfully into Event grid topic but never trigger to Azure function (After enable it again). Correct me If I am doing wrong while testing . – Nitin Jain Oct 21 '18 at 10:13
  • That is a good way to test it - by stopping the function. How did you configure the retry and dead letter settings? – dbarkol Oct 21 '18 at 15:33
  • I used disable variable stored into App setting file i. [Disable("setting")] this 'setting' variable value stored into app setting in Azure portal app setting file. I change this false or true on portal. Thanks now I am able to test dead letter feature and it working fine without using dead letter storage blob . I just set retry interval 30 Min. earlier i was keeping 2-5 minutes which was insufficient to event grid subscription. – Nitin Jain Oct 21 '18 at 15:43