Table of Contents

Interface IPublisher

Namespace
RabbitMQ.AMQP.Client
Assembly
RabbitMQ.AMQP.Client.dll

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

message IMessage
cancellationToken CancellationToken

Returns

Task<PublishResult>

A Task representating the await-able result of the publish operation.

Exceptions

InvalidOperationException
NotSupportedException
PublisherException