scenario-based-labs icon indicating copy to clipboard operation
scenario-based-labs copied to clipboard

Suggestion - ChangeFeed Retry Strategy

Open mpaul31 opened this issue 5 years ago • 2 comments

I would love to see a more real-world example of how to handle retries during a change feed with azure functions. it would be really convenient if there was a way for the function (consumer) to signal back to the processor something went wrong and retry at a later point.

Thanks!

mpaul31 avatar May 12 '20 13:05 mpaul31

@mpaul31 thanks for the great suggestion! This can absolutely be done by using Polly, which is also used for the HttpClient calls via a simple retry policy. Could you clarify a little a concrete example of what you want to see for a retry strategy? If we're talking about multiple instances of the consumer(s), then the problem increases in complexity. You would want something along the lines of a distributed circuit breaker, which goes a bit beyond the original scope.

joelhulen avatar May 12 '20 17:05 joelhulen

@joelhulen a retry would be necessary when an exception occurs during the processing of the document(s) on a change feed trigger. Could be transient or could be something more major downstream causing the error. Also, I noticed the change feed sdk has a pull-based model in preview. maybe this could be used in tandem to ensure reliability?

mpaul31 avatar May 13 '20 14:05 mpaul31