Getting Started
Architecture
NServiceBus
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

RabbitMQ Transport Upgrade Version 4.0 to 4.1

Component: RabbitMQ Transport

Custom routing topology

The UseRoutingTopology method has a new overload with a parameter representing a factory delegate, which creates the custom routing topology. The factory delegate allows the use of non-default constructors for custom routing topology instances. The UseRoutingTopology method overload with no parameters is deprecated.

// For RabbitMQ Transport version 4.x
var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.UseRoutingTopology<MyRoutingTopology>();

// For RabbitMQ Transport version 4.x
var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.UseRoutingTopology(
    topologyFactory: createDurableExchangesAndQueues =>
    {
        return new MyRoutingTopology();
    });

Related Articles

  • Routing topology
    Information about the routing topology options available in RabbitMQ and how they impact NServiceBus systems.