Table of Contents

Interface IRabbitMQTransportBuilder

Namespace
Excalibur.Dispatch.Transport.RabbitMQ
Assembly
Excalibur.Dispatch.Transport.RabbitMQ.dll

Fluent builder interface for configuring RabbitMQ transport options.

public interface IRabbitMQTransportBuilder : IRabbitMQConnectionBuilder, IRabbitMQTopologyBuilder, IRabbitMQRoutingBuilder
Inherited Members
Extension Methods

Examples

services.AddRabbitMQTransport("events", rmq =>
{
    rmq.HostName("localhost")
       .Port(5672)
       .VirtualHost("/")
       .Credentials("guest", "guest")
       .ConfigureExchange(exchange =>
       {
           exchange.Name("events")
                   .Type(RabbitMQExchangeType.Topic)
                   .Durable(true);
       })
       .ConfigureQueue(queue =>
       {
           queue.Name("order-handlers")
                .Durable(true)
                .PrefetchCount(10);
       })
       .ConfigureBinding(binding =>
       {
           binding.Exchange("events")
                  .Queue("order-handlers")
                  .RoutingKey("orders.*");
       })
       .MapExchange<OrderCreated>("events");
});

Remarks

This interface follows the Microsoft-style fluent builder pattern with single entry point and fluent chaining for configuring RabbitMQ transport connections, exchanges, queues, bindings, and dead letters.

The builder is composed of focused sub-interfaces following the Interface Segregation Principle:

Access this builder through AddRabbitMQTransport(IServiceCollection, string, Action<IRabbitMQTransportBuilder>).