Maximizing throughput from RabbitMQ into Broadway


We are experimenting with Broadway as part of an event processing pipeline with the events being sourced from RabbitMQ. I’ve already noticed that setting concurrency does help throughput for the producer, but I’m pretty sure that only one connection is being created to RMQ from my Elixir app. If I start a second copy of my app, I get increased throughput (using no-ops for the processing and batching stages). Is there a way for Broadway to leverage additional RMQ connections? Or is running additional copies of the app the “right” way to do this?

Related to this is the single-threaded nature of RMQ queues. Docs suggest using the sharding and/or consistent hash plugins so additional connections are not restricted by the single-threaded queue. Has anyone used this approach and if so, how did you integrate it with Broadway?


1 Like