Rebus & RabbitMq always seems to use "RabbitTopics" exchange

228 Views Asked by At

I am trying to get rebus.rabbitmq (4.4.2.0) to use a specific exchange name to send messages via rabbitmq, but no matter what I do with the configuration, it persistently distributes to an exchange called "RebusTopics", I'm expecting "RebusBus" from the configuration. Am I doing something wrong in the configuration here?

using (var publisher = new BuiltinHandlerActivator())
{

    var publishBus = Configure.With(publisher)
        .Transport(y => y.UseRabbitMq(rabbitUrl, "_Rebus")
        .ExchangeNames(directExchangeName: "RebusBus"))
        .Start();

    publishBus.Advanced.Topics.Publish("Debug", new DebugMessage()).Wait();
}
1

There are 1 best solutions below

0
On

Aand, I posted this question, then found the way to do this:

.ExchangeNames(topicExchangeName: "RebusBus"))

I was setting the wrong optional parameter, it needs to be topicExchangeName, not directExchangeName.

I still can't get Rebus out of topic mode, but importantly, in topic mode it is working.