namespace Svrnty.CQRS.Notifications.Abstractions;
///
/// Publishes notifications to all subscribed gRPC clients.
///
public interface INotificationPublisher
{
///
/// Publish a notification to all subscribers matching the subscription key.
/// The subscription key is extracted from the notification based on the
/// property.
///
/// The notification type marked with .
/// The notification to publish.
/// Cancellation token.
Task PublishAsync(TNotification notification, CancellationToken ct = default)
where TNotification : class;
}