RabbitMq + Masstransit queues

356 Views Asked by At

In the most part of tutorials mentioned that publisher and subscriber should have different queues. Why so?

Will it work with one queue?

1

There are 1 best solutions below

0
On

MassTransit will not work with multiple bus instances assigned to a queue. Each instance will just grab the next message - so each bus will gobble up the other bus' messages. This ends up in a bad place. If there is no consumer registered for a given message type, then the message is rejected to the error queue. It often leaves you with errors and no indication as to why things are erroring or messages aren't showing up right.

Now if you are doing competing consumers for load balancing you could have multiple buses on the same queue - but they should be exact copies of each other and only done for load balancing.