Class RabbitMQProducer

Assembly: redb.Route.RabbitMQ.dll

RabbitMQ producer. Sends messages to an exchange/queue with support for:
Immediate — direct publish via BasicPublishAsync.Transactional — deferred publish via . The message is
captured (cloned) at Process time and only sent on Commit.RPC — request/reply pattern with a temporary reply queue and
correlation-based response routing.

public sealed class RabbitMQProducer : ConnectableProducer, IProducer, IProcessor

Inheritance

Object→ConnectableProducer→RabbitMQProducer

Implements

Inherited Members

Properties

ProducerEndpoint

The endpoint this producer sends to.

protected override IEndpoint ProducerEndpoint { get; }

ProducerName

Display name for logging (e.g. "http:https://api.example.com", "kafka:orders").

protected override string ProducerName { get; }

Methods

ConnectAsync(CancellationToken)

Set up connection/resources. Awaited by Start() to completion before IsStarted flips to

protected override Task ConnectAsync(CancellationToken ct)

DisconnectAsync(CancellationToken)

Tear down connection/resources. Called from Stop() after the started flag is cleared.

protected override Task DisconnectAsync(CancellationToken ct)

Process(IExchange, CancellationToken)

Processes the exchange asynchronously.

public override Task Process(IExchange exchange, CancellationToken ct = default)

Constructors