使用 RabbitMQ 订阅远程队列

Cla*_*lay 2 masstransit rabbitmq

使用 Mass Transit 和 RabbitMQ 设置对远程端点发布的消息的订阅的建议方法是什么?

在我们的例子中,大多数发布/订阅都是本地的,但对于我们的开发人员来说,订阅远程计算机上的共享发布者会很方便。

我看到的所有示例似乎都是本地的:http://docs.masstransit-project.com/en/latest/configuration/sub_config_api.html

看起来 RabbitMQ 联邦可能是一个选择,但看起来比我们需要的更复杂:http://www.rabbitmq.com/federation.html

Cla*_*lay 5

ReceiveFrom("rabbitmq://TheRemoteMachine/SubscriberName")我只需调用订阅远程发布者的订阅者和ReceiveFrom("rabbitmq://localhost/QueueName")订阅本地发布者的其他订阅者就可以获得我想要的结果。

TheRemoteMachine 上的交换和绑定以及本地主机上的交换和绑定都按照我的预期进行了设置。

http://docs.masstransit-project.com/en/latest/configuration/quickstart.html

http://docs.masstransit-project.com/en/latest/overview/keyideas.html#address