Reputation: 703
I am currently using MassTransit for pub/sub. Now I have a use case where I want to use MassTransit in a work queue scenario as described on the RabbitMQ website https://www.rabbitmq.com/tutorials/tutorial-two-dotnet.html
I have read the documentation for MassTransit but cannot find something about work queues.
It is possible to use MassTransit for this use case and if so, could someone then please provide an example.
Upvotes: 1
Views: 1026
Reputation: 6713
Yes, this is quite possible. If you have two processes that share a queue, they will compete for work - the messages will only be delivered to one of the processes.
See https://northerncodemonkey.wordpress.com/2015/07/06/competing-consumers-with-masstransit-and-rabbitmq/ for more information.
The key phrase to search for when looking for examples etc is competing consumers
.
Upvotes: 2