namespace TakeoutSaaS.Application.Messaging.Abstractions;

/// <summary>
/// 领域事件发布抽象。
/// </summary>
public interface IEventPublisher
{
    /// <summary>
    /// 发布领域事件。
    /// </summary>
    Task PublishAsync<TEvent>(string routingKey, TEvent @event, CancellationToken cancellationToken = default);
}
