4

We are using Cosmos DB change feed to solve some of our requirements. Wanted to understand if there is any retry mechanism available in change feed. For example, if I get a batch of 10 documents and 3rd one can't be processed for some reason, can I replay only the 3rd message again?

There are three ways of consuming change feed:

  1. Azure Functions - Did not see ant retry mechanism for this.

  2. Change feed processor library - If there is any exception in processing a batch of documents, all of them are replayed again.

  3. Azure Cosmos DB SQL API SDK - Have not explored this in detail. But we have complete control on checkpointing, so we can probably replay starting from a failed message.

I am yet to find an option to retry only the failed messages from a batch of messages.

Amlan
  • 241
  • 6
  • 13

1 Answers1

2

Currently there is no such mechanism, would be good to have though. One way that may help is to use manual checkpointing (CheckpointFrequency in ChangeFeedProcessorSettings, ChangeFeedObserverContext.CheckpointAsync()). But note that even with manual checkpointing the atomic unit is still a batch.