Search code examples
c#rabbitmqeasynetq

implementing work queue pattern with easynetq driver on rabbit mq


How to implement work queue in rabbit mq using easynetq driver?

Also acknowledgement in both publisher and subscriber is desirable.

The idea is that one message will be processed only by a single subscriber. Is this a default behavior or the message fans out from the publisher to the subscriber?


Solution

  • The simple publish subscribe pattern implements the work queue pattern. When two consumers are present, the first consumers was getting all the messages because the prefetch count was 50 (default) preventing the other consumer from not getting any messages.