antirez / disque

Disque is a distributed message broker
BSD 3-Clause "New" or "Revised" License
8.01k stars 537 forks source link

Is disque suitable with multiple consumers #159

Open emadb opened 8 years ago

emadb commented 8 years ago

Hi all, thanks for what you are doing! I would like to know if I can use disque in scenarios where a single message (job) must be consumed by multiple consumers (usually the sender doesn.t know how many consumers needs that message) For example the "event" that a new order is issued must be forwarded to the warehouse service and to the invoice service for correct management. Can I use disque is this use case? Thx

mathieulongtin commented 8 years ago

No, you would need to submit the job to a different queue for each service. It would be nice for disque to support this more natively like NSQ or Kafka. Maybe addjob could support more than one queue.

emadb commented 8 years ago

Thx. That means that I could create a queue for every consumer and write a sort of router/dispatcher that receive the first job (sent by the producer) and resend it to every registered queue.

mathieulongtin commented 8 years ago

Correct.