【问题标题】:Subscribe to remote queue using RabbitMQ使用 RabbitMQ 订阅远程队列
【发布时间】:2012-04-06 03:25:58
【问题描述】:

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

在我们的例子中,大多数 pub/sub 是本地的,但我们的开发人员都可以方便地订阅远程机器上的共享发布者。

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

RabbitMQ 联合似乎是一种选择,但看起来更复杂,我们需要:http://www.rabbitmq.com/federation.html

【问题讨论】:

    标签: rabbitmq masstransit


    【解决方案1】:

    我只需为订阅远程发布者的订阅者调用 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

    【讨论】:

      【解决方案2】:

      你有没有用 Masstransit 3 更新过这个?我遇到了同样的困难,因为现在有几件事发生了变化。

      【讨论】: