Question

As a exercise I'm trying to find an example which implements competing consumer.

many producers - > MSMQueue <- competing consumers

So far I did not find any documentation on how to achieve this. My first attempt to figure out how is implemented in MassTransit or NServiceBus failed to many layers of indirection.

Any help will be greatly appreciated.

Was it helpful?

Solution

With MassTransit and MSMQ you can achieve this using the Distributor component.

Note that if you use MassTransit with RabbitMQ instead of MSMQ, you can implement a competing consumer scenario without using the Distributor, simply by setting the same queue name for all consumers. If you can choose between MSMQ and RabbitMQ, I'd go for RabbitMQ, as you get better management tools and SSL encryption, and it plays nicely with firewalls too.

There is some discussion on this over on the MassTransit Google Groups forum.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top