Share via

Does EventGridTrigger support batch events generated from Event Grid "output batching"?

AzureSDE 116 Reputation points
2021-11-19T15:19:53.553+00:00

0

I'm trying to understand the behavior of output batching in EventGrid when using EventGridTrigger in Azure Function v2 functions.

I turned on the output batching in the event grid. My subscriber function uses 'EventGridTrigger' and the number of events received by my subscriber function is always 1.

Does this mean turning on output batching in EventGrid in this scenario does not actually utilize the batching capability in Event Grid?

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

Azure Event Grid
Azure Event Grid

An Azure event routing service designed for high availability, consistent performance, and dynamic scale.


Answer accepted by question author

Pramod Valavala 20,661 Reputation points Microsoft Employee Moderator
2021-11-22T02:48:43.427+00:00

@AzureSDE The Event Schema received by the configured endpoints is always an array and when leveraging output batching, there are more than one event in the received payload. But the Event Grid Trigger invokes your function once for each event unless you are binding to an array.

Also, note that batching is not guaranteed to include the max number of events configured, especially with low event rates.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.