disque icon indicating copy to clipboard operation
disque copied to clipboard

Is disque suitable with multiple consumers

Open emadb opened this issue 8 years ago • 3 comments

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

emadb avatar Jan 19 '16 17:01 emadb

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.

mathieulongtin avatar Jan 19 '16 18:01 mathieulongtin

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.

emadb avatar Jan 19 '16 19:01 emadb

Correct.

mathieulongtin avatar Jan 19 '16 19:01 mathieulongtin