Home > Software engineering >  Azure Event Grid Empty Event
Azure Event Grid Empty Event

Time:12-11

I'm looking for a way to be notified once an event grid topic has no more queued events. I was hoping event grid like many Azure services could emit events on certain things happening but it doesn't appear to be so. Ideally I'd like avoid polling the topic to check if the queue is empty.

The event grid topic isn't used that often, but when it is it'll receive a dump of ~1M events which will take an hour or two for the azure function subscriber to chew through. I'm looking for a sort of 'queue empty' notification so I can do some post processing tasks which currently I'm having to do manually.

CodePudding user response:

You can create an alert on Azure Event Grids that is looking at the metrics and afterwards sends it to whatever you want - Event Hub, Logic App or Azure function.

Here is a link for the documentation:

https://docs.microsoft.com/en-us/azure/event-grid/set-alerts#create-alerts-on-other-metrics-or-activity-log-operations

CodePudding user response:

The Azure Event Grid (AEG) is the PUSH eventing Pub/Sub model, so there is no polling the topics. However, using the destination resource such as the Azure Service Bus (ASB) you can pull-up the event messages from its queue entity based on the consumer side needs.

The ASB (premium tier) is integrated to the AEG for emitting an event based on the messages in the queue and its listener/receiver activity. It's suitable for cases with a low volume of messages to avoid a continuously polling for messages in the queue.

See, my answer here for cases when the ASB will emitted an event to the AEG. Based on that, you can build a re-triggered timer (watchdog) for your scenario.

  • Related