Question

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

Was it helpful?

Solution

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

OTHER TIPS

Have you updated this with Masstransit 3 by any chance? I am having the same type of difficulty since several things have changed now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top