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();
});