We're using NServiceBus on top of MSMQ. Now we are making a move to use RabbitMQ - we would like a centralized queue, and found that RabbitMQ best answer our needs.
Converting our project was easy, and in RabbitMQ we've noticed that it created an exchange (and queue) for each endpoint and message type in that endpoint.
I've read the Changing routing topology section in http://docs.particular.net/nservicebus/rabbitmq/configuration-api and it written there
For less complex scenarios you can use the DirectRoutingTopology
What the documentation failed to explain are the parameters that considure a solutions as complex
.
I've searched and could not find somewhere that explains what is considered complex, and when should a DirectRoutingTopology
be used over the default option where multiple exchanges are used. Or what is the difference / performance considerations between each approach.
Does anyone know?
It's not really a matter of performance, more a matter of using the technology in the best way possible.
Each queue is meant to be a unit of work to be done. So let's say I send in messageA, if there is 1 unit of work to be done then it makes sense to have 1 exchange with 1 queue to process the messages.
Let's say you have messageB that needs action X and Y to both be executed. In that case you'd have 1 exchange that sends a message to 2 different queues (FANOUT Exchange)
Let's say you have messageC that needs action X OR Y to be executed based on a parameter. In that case you'd want to use a DIRECT exchange with routing specified to 2 different queues (but the message would only end up in 1 of the 2 queues).
Hopefully that makes good sense.