Class RabbitMQComponent

Assembly: redb.Route.RabbitMQ.dll

RabbitMQ transport component for redb.Route.
Scheme: rabbitmq.

URI format: rabbitmq://queue-name?host=localhost&exchange=my-exchange&routingKey=key


Owns a process-wide pool of instances, shared between endpoints
according to a deterministic key:
If connectionFactory=name is set on the URI — key is "factory:{name}".
Two factories with identical parameters but different names produce two distinct
connections (the factory name is the connection identity).Otherwise — key is "inline:{host}:{port}/{vhost}@{user}#ssl:sni={sslServerName}:cert={sslCertPath}"
(the TLS part only with ssl=true, each of its fields only when set). Endpoints
with identical inline connection parameters share one connection automatically.
Connections are created lazily on first endpoint use and released only when the component
itself is disposed by . Channels are cheap and remain
owned by individual producers/consumers; endpoint.Stop() closes channels but never
pooled connections (so connections survive Stop/Start cycles).

public sealed class RabbitMQComponent : ComponentBase, IComponent, IAsyncDisposable

Inheritance

Object→ComponentBase→RabbitMQComponent

Implements

Inherited Members

Properties

Scheme

The URI scheme this component handles (e.g., "kafka", "rabbitmq").

public override string Scheme { get; }

StructuredPathSynonym

Structured XML form: <rabbitmq queue="orders"/>.

public override string? StructuredPathSynonym { get; }

Methods

CreateEndpoint(EndpointUri)

Creates an endpoint from a parsed URI.

public override IEndpoint CreateEndpoint(EndpointUri uri)

DisposeAsync()

Closes every pooled connection. Called by ;

public override ValueTask DisposeAsync()