Change feed procesor control leases #2380
Replies: 1 comment
-
The short answer is no. The backend Change Feed API that is consumed can be consumed at the per-partition level currently. So what the Change Feed Processor does is create 1 lease per partition, and in parallel consume each lease's changes invoking the Change Feed API for the partition of that lease. This effectively allows users to parallelize compute across multiple machines and the reason why you'd like to use the CFP. There is another way to consume the Change Feed - The pull model: https://docs.microsoft.com/en-us/azure/cosmos-db/change-feed-pull-model There is a table there that explains the differences. If you are going to have a single machine and you don't require the compute distribution, you might want to try the pull model. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a problem with controling how many leases are done by change feed processor. In my case i want to use it to migrate some data from one storage to another and control how many RU is consumed. I'm able to achieve it but in some scenarios where I want to habe only one lease, one instance of processor is creating and handling more leases and multiple my RU usage.
Is there any way to control this behavior and for example prevent from creating more than one lease? Any code examples?
Beta Was this translation helpful? Give feedback.
All reactions