Search code examples
c#asp.netasp.net-mvcmsmqmasstransit

How can I target my message to a specific URL using MassTransit and MSMQ?


As per my understanding, MSMQ broadcasts messages and and the subscribers who have subscribed for the given type will accept and process that message.

I was wondering If I could target my outgoing message to a specific server rather than broadcasting it all over the network.


Solution

  • There's an endpoint factory you can use to create an IEndpoint. From there, call Send() and it will send the message directly to that endpoint.