Search code examples
.netpublish-subscriberebus

Rebus deliver to specific queue


I have an application where two different applications send, via HTTP, requests to save data. The HTTP endpoint offloads some processing work into a background task. When this work completes I am currently using IBus.Publish with the result of that work. This requires my handlers to be able to handle "responses" for data that is not relevant to them. The type of the response is the same however, so I don't think Send solves this issue because both clients can handle this type. Is it possible to Send to a specific known queue?


Solution

  • With Rebus you can send to a specific queue with the routing API:

    await bus.Advanced.Routing.Send("queue-name", yourMessage);