NserviceBus 6 use MsmqTransport not working

200 Views Asked by At

We are using NSB 6.0. I have set up RabbitMQTransport and MsmqTransport on my configuration with following code

if (this.UseRabbitMQ)
        {
            config.UseTransport<RabbitMQTransport>().Transactions(TransportTransactionMode.ReceiveOnly);
        }
        else
        {
            config.UseTransport<MsmqTransport>().Transactions(TransportTransactionMode.ReceiveOnly);
        }

I have no problem with RabbitMQTransport, But as soon as I switch to MsmqTransport I have the following error.

"The given key (RabbitMQ.RoutingTopologySupportsDelayedDelivery) was not present in the dictionary.'"

1

There are 1 best solutions below

1
On BEST ANSWER

I'm not sure what's the requirement to run either one transport or another. RabbitMQ has a feature that is picked up when assembly scanning is taking place and executed even though it's not configured to be the transport. You'll have to explicitly exclude RabbitMQ transport assembly from scanning using assembly scanning API.