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. This allows the use of non-default constructors for custom routing topology instances. The UseRoutingTopology method overload with no parameters is deprecated.

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

Related Articles


Last modified