Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Event Grid Batching Behavior

I'm working with an Event Grid Topic, subscribed to an EventGridTrigger.

The event subscription can be configured with a MaxEventsPerBatch, which according to the docs is "Maximum number of events Event Grid will deliver per batch"

If my setting is at 1500 max events per batch. And I send/publish a batch of 3000 events to the event grid.

Does that mean that I will be sent 2 batches of 1500 to my subscriber?

like image 856
mkcoding Avatar asked Jul 07 '26 08:07

mkcoding


1 Answers

I had a very similar question and could only find the following for an answer.

Yes, it seems that what you had assumed is correct, but the execution could be different depending on the subscriber. For what I was interested in, Function Apps, all I could find was this buried information about how the Function App would handle the batched events. The important text in that link is

The example shown is an array of one element. Event Grid always sends an array and may send more than one event in the array. The runtime invokes your function once for each array element.

So even if you send 2 batches of 1500 events each, if your Function App is configured using the Azure Event Grid Trigger, then you would still get 3000 separate executions of your Function App.

I know this is a bit late, but hopefully it helps someone!

like image 189
B. Witter Avatar answered Jul 11 '26 01:07

B. Witter