0

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?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
TrustyCoder
  • 4,749
  • 10
  • 66
  • 119
  • Hi. This is a very broad question and sounds like you should go have a read of the (good) rabbitmq documentation. Edit: Actually, if you are planning on using easynetq, they also have quite a lot of good documentation on how to do exactly what you are looking for. – chris.ellis May 17 '16 at 12:31
  • It seems the default behavior for publish subscribe pattern is using direct exchange instead of fanout which i assumed. So only one consumer gets the message instead of multiple consumers getting the published message. – TrustyCoder May 17 '16 at 13:08
  • @TrustyCoder What exactly is your desired behavior? if you use the default pub/sub sample for easynetq you will have a usable worker queue setup. – Wiebe Tijsma May 18 '16 at 08:34

1 Answers1

0

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.

TrustyCoder
  • 4,749
  • 10
  • 66
  • 119