简体   繁体   English

Rebus和RabbitMq似乎总是使用“ RabbitTopics”交换

[英]Rebus & RabbitMq always seems to use “RabbitTopics” exchange

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. 我正在尝试让rebus.rabbitmq(4.4.2.0)使用特定的交换名称来通过Rabbitmq发送消息,但是无论我如何进行配置,它都将持续分布到名为“ RebusTopics”的交换中配置中的“ RebusBus”。 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();
}

Aand, I posted this question, then found the way to do this: Aand,我发布了这个问题,然后找到了解决方法:

.ExchangeNames(topicExchangeName: "RebusBus"))

I was setting the wrong optional parameter, it needs to be topicExchangeName, not directExchangeName. 我设置了错误的可选参数,它必须是topicExchangeName,而不是directExchangeName。

I still can't get Rebus out of topic mode, but importantly, in topic mode it is working. 我仍然无法使Rebus脱离主题模式,但重要的是,在主题模式下它仍在工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM