Interface IPublisher
Interface for publishing messages to an AMQP broker. Implementations of this interface are expected to be thread-safe.
public interface IPublisher : ILifeCycle, IDisposable
- Inherited Members
Methods
PublishAsync(IMessage, CancellationToken)
Publishes a message to the broker asynchronously.
Task<PublishResult> PublishAsync(IMessage message, CancellationToken cancellationToken = default)
Parameters
messageIMessagecancellationTokenCancellationToken
Returns
- Task<PublishResult>
A Task representating the await-able result of the publish operation.