Husker
Husker

Reputation: 61

Send to multiple RabbitMQ hosts with MassTransit

I'm using MassTransit in .NET application with RabbitMQ. It works as it should, I have configured and registered MassTransit bus control in ioc and now I can send messages to my RabbitMQ instance and consume them.

Now I need to have possibility to send message to another instance of RabbitMQ. How do I do this? I don't need to consume messages from this other RabbitMQ, I only need to send there something.

I tried to inject ISendEndpointProvider and use GetSendEndpoint with URI of my other RabbitMQ instance but that does not seems to work. I don't have any errors but my other RabbitMQ doesn't get any messages when I try to send them that way. MassTransit documentation doesn't say anything about connecting to multiple hosts.

Thanks for all suggestions.

Upvotes: 1

Views: 1520

Answers (1)

Chris Patterson
Chris Patterson

Reputation: 33258

UPDATE: As of v7, MassTransit includes support for multiple bus instances.

Upvotes: 4

Related Questions