Reputation: 2004
I have a change feed processor:
var changeFeedProcessor = monitoredContainer
.GetChangeFeedProcessorBuilder<Model>("original-processor-name", HandleChangesAsync)
.WithInstanceName(Environment.MachineName)
.WithLeaseContainer(leaseContainer)
.Build();
HandleChangesAsync()
is getting too big and failures are no longer well isolated. I'd like to break this into multiple processors, ie "new-processor-name-1" and "new-processor-name-2", but I'm not sure how to go about it in such a way that the new processors will not re-process all of the existing documents from the beginning.
Is there any way to have the new processors start off where the original one left off?
Upvotes: 0
Views: 779
Reputation: 4870
You can create one more changeFeedProcessor
and write it's own HandleChangesAsync
method. Also note that you can give same Lease prefix
and same Lease container
in it's setting to ensure that these both processors work according to each other's checkpoints (if that is what you are trying to achieve), otherwise if you want both processors to work individually with their own checkpointing, you can have separate Lease prefixes for them.
Upvotes: 1