Why can NServicebus not send messages to a queue with a different RabbitMQ virtual host?

269 Views Asked by At

I have 2 deployed services that use NServicebus messaging to communicate via RabbitMQ. However the micro-services use different virualhosts on RabbitMq and the messages sent across are not being picked up.

If I locally run both services and use the same virtual host everything works. Is there a reason why messages can not cross virtual hosts and is there a way around this problem without having services deployed multiple times with different virtual hosts?

I would have though that send options would have a way to specify the virtual host in code but I can not find anything that works

1

There are 1 best solutions below

0
On BEST ANSWER

For anyone wondering RabbitMQ has a function called shovels that you can use to move messages across virtual hosts. Just note that you need to name the queues correctly for it to work.