Hi Wessel Vonk While maxEventBatchSize
in host.json
allows you to control how many events are batched per function invocation, there are indeed platform-level limits that can implicitly cap batch size even if you set a high value like 5000.
Here are considerations:
- Event Hubs platform limit: There's no official hard limit on the number of events per batch received, but the total batch size is influenced by the prefetch count, event size, and memory pressure. Azure Functions uses the EventProcessorHost under the hood, which may limit batch sizes dynamically based on throughput and system conditions.
- Max payload size: While not strictly documented for Event Hub triggers, the maximum event size is 1 MB per event. A batch could be constrained by the maximum message buffer limit, though this is not always explicitly enforced unless hitting memory/resource limits.
- Observed behavior: In practice, if
maxEventBatchSize
is very high, you might still receive fewer events than requested, depending on: Available events in the partition, maxWaitTime, Runtime conditions (e.g., throttling or internal batching).
For official guidance, refer to: Azure Functions host.json reference for Event Hub
Hope this helps. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.