You can now add queues and workers as subscribers to your IronMQ queues so now a single message post can be pushed onto multiple queues and/or start IronWorker tasks. This is often referred to as "fan-out" and opens up a lot of interesting possibilities such as:
- Multiple consumers of a single message.
- Better decoupling by adding queues as subscribers that different consumers can consume without the producer of the messages having to know about it.
- Better performance since you only need to push one message then let IronMQ deal with distributing it to multiple queues.
How To Add Queues and Workers as Subscribers
You pass these in to the queue update endpoint or the add/remove subscribers endpoints with json like the following:
That would set 5 subscribers on your queue, 3 subscribers are other queues, 1 is a worker and 1 is a normal http endpoint subscriber.
Being able to fan-out messages into other queues enables a lot of interesting messaging scenarios and we hope it can help solve some of your messaging problems. Give it a try and let us know what you think, we love feedback!
This site uses Akismet to reduce spam. Learn how your comment data is processed.