using MediatR;
namespace DigitalData.EmailProfiler.Application.Common.Interfaces;
///
/// Interface for publishing commands to a message broker (e.g., RabbitMQ)
///
public interface ICommandPublisher
{
///
/// Publishes a command to the message broker for asynchronous processing
///
/// The command type (must implement IRequest)
/// The command to publish
/// Cancellation token
/// Task representing the publish operation
Task PublishAsync(TCommand command, CancellationToken cancellationToken = default)
where TCommand : IRequest;
}