snatch-dev/Convey

HandlersLoggingDecorator Logs commands/events even if messages has been handled and stored in outbox

Opened this issue · 1 comments

It looks like it happens due to the order of registration of the decorators, Where can I get documentation around it.

Using Version Convey 5.*

Order of Registration

builder.Services.TryDecorate(typeof(ICommandHandler<>), typeof(OutboxCommandHandlerDecorator<>));
builder.Services.TryDecorate(typeof(IEventHandler<>), typeof(OutboxEventHandlerDecorator<>));

builder
 .AddExceptionToMessageMapper<ExceptionToMessageMapper>()
 .AddMessageOutbox(o => o.AddEntityFramework<OutboxDbContext>())
 .AddHandlersLogging();