outbox checkpoint
This commit is contained in:
13
src/Common/Mccn.Common.Infrastructure/EventBus/EventBus.cs
Normal file
13
src/Common/Mccn.Common.Infrastructure/EventBus/EventBus.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using MassTransit;
|
||||
using Mccn.Common.Application.EventBus;
|
||||
|
||||
namespace Mccn.Common.Infrastructure.EventBus;
|
||||
|
||||
internal sealed class EventBus(IBus bus) : IEventBus
|
||||
{
|
||||
public async Task PublishAsync<T>(T integrationEvent, CancellationToken cancellationToken = default)
|
||||
where T : IIntegrationEvent
|
||||
{
|
||||
await bus.Publish(integrationEvent, cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user