using Femto.Common.Infrastructure.Outbox; using Femto.Common.Integration; using Microsoft.Extensions.Logging; namespace Femto.Modules.Blog.Infrastructure; public class OutboxMessageHandler(IEventPublisher publisher, ILogger logger) : IOutboxMessageHandler { public async Task HandleMessage( TNotification notification, CancellationToken executionContextCancellationToken ) { if (notification is IEvent evt) { await publisher.Publish(evt); } else { logger.LogWarning("ignoring non IEvent {Type} in outbox message handler", typeof(TNotification)); } } }