azure-cosmos-dotnet-repository icon indicating copy to clipboard operation
azure-cosmos-dotnet-repository copied to clipboard

`IEventItemProjectionBuilder<TEventItem>` - Dead Letter Container Decorator

Open mumby0168 opened this issue 2 years ago • 0 comments

If we fail to handle a change from the change feed. We want to make sure that we store a copy of that event. We can write this EventItem directly to another container, acting much like a dead letter queue. We can then provide another processor that can poll this dead letter queue and try and re-process them, we could provide a mechanism that will only retry and event 5 times for example. If it still fails then we could log a critical failure. We can also allow a consumer to configure that a given exception means the event will never succeed, it can then be marked in the dead letter container as a critical failure.

Again I think we can use a decorator pattern to wrap a default implementation with something that catches these exceptions and deals with the dead-lettering.

mumby0168 avatar Mar 19 '22 11:03 mumby0168