0
votes

I have an Azure Function hosting on App service plan with Event Hub trigger. The Event Hub has 4 partitions.

My question is, if the function has only one instance, how the function process the events from 4 partitions? Does this one instance function acquire lease of all 4 partition, and round robin to process partition by partition?

1

1 Answers

0
votes

If you want to know a single instance how to handle multiple partitions, the azure function doc has a sample about it:Trigger - scaling.

The main idea is when your function is first enabled, there is only one instance of the function, function has a single instance of EventProcessorHost that holds a lease on all ten partitions. This instance will read events from partitions 0-9.

And it list three situation New function instances are not needed, An additional function instance is added and N more function instances are added.

Your requirement is one instance, in the doc it says the instance will handle all events before the Function Scaling logic take effect.