Reputation: 11605
What is the suggested approach for setting up a subscription to a message published by a remote endpoint using Mass Transit and RabbitMQ?
In our case, most pub/sub is local, but it will be convenient for our developers to all subscribe to a shared publisher on a remote machine.
All the examples I see appear to be local: http://docs.masstransit-project.com/en/latest/configuration/sub_config_api.html
It appears that RabbitMQ federation may be an option, but looks more complicated that we need: http://www.rabbitmq.com/federation.html
Upvotes: 2
Views: 4044
Reputation: 671
Have you updated this with Masstransit 3 by any chance? I am having the same type of difficulty since several things have changed now.
Upvotes: 0
Reputation: 11605
I was able to get my desired results by simply calling ReceiveFrom("rabbitmq://TheRemoteMachine/SubscriberName")
for the subscriber subscribing to remote publisher and ReceiveFrom("rabbitmq://localhost/QueueName")
for the other subscribers that subscribe to local publishers.
The exchanges and bindings on TheRemoteMachine were setup as I expected as well as the exchanges and bindings on localhost.
http://docs.masstransit-project.com/en/latest/configuration/quickstart.html
http://docs.masstransit-project.com/en/latest/overview/keyideas.html#address
Upvotes: 5