azurepullazure-eventgridttl

What is the TTL for events in Azure Event Grid with Pull model?


I want to consume events from Event Grid, using pull model. I wonder how much time do I have to consume a message? For example, if my application work only on week days, can I consume an event after 72 hours (event produces on Friday, and application starts working on Monday).

I can see that TTL for push model is at most 24 hours, but it is not clear for me, what about pull model.


Solution

  • According to this Quotas and limits - Azure Event Grid - Azure Event Grid | Microsoft Learn and This table - Choose the right Event Grid tier for your solution - Azure Event Grid | Microsoft Learn

    Given the Basic tier's throughput of up to 5 MB/s for both ingress and egress, and a maximum message retention of 1 day, your application must pull messages within this retention period to avoid missing any.

    Firstly, converting the throughput to seconds indicates that you can pull 5 MB of data every second. Calculating the potential accumulation of data in 1 day:

    5 MB/s * 3600 seconds/hour * 24 hours/day = 432,000 MB

    Considering that there are 1024 MB in a GB:

    432,000 MB / 1024 = 421.875 GB

    This implies that you can accumulate approximately 421.875 GB of messages within 1 day.

    To determine the time available to consume a message, divide the total accumulated data by the throughput rate:

    421.875 GB * 1024 MB/GB / 5 MB/s = 86,015.625 seconds

    This translates to roughly 23.89 hours.

    Therefore, you have approximately 23.89 hours to consume a message from Event Grid using the pull model before it expires, based on the Basic tier's throughput and message retention of 1 Day. The duration available for consuming messages from Azure Event Grid using the pull model is determined by the maximum event retention period allocated for namespace topics, which is set to 7 days as per the provided limits.