I'm using Change Feed
with Azure Functions
. I have a CosmosDBTrigger
assigned to each individual container with a unique LeaseCollectionPrefix
. This seems to be working fine, but I'm not quite clear on what happens when the consumption-based Functions
runtime decides to scale and create multiple active workers.
I need to ensure that multiple workers do not receive changes for the same logical partition key because I update some aggregate information and don't want concurrency to mess this up. Does the Change Feed
push model automatically assign logical partition key ranges per active worker? Or will changes be delivered to the first available worker, thus, making it possible for the same logical partition key to appear in multiple workers?