reactor / reactor-rabbitmq

Reactor RabbitMQ
Apache License 2.0
157 stars 55 forks source link

Reuse channel in receiver to allow setup global qos #181

Open abialas opened 1 year ago

abialas commented 1 year ago

Receiver creates a new channel for every queue it consuming from. It removes the possibility to set global qos (described here: https://www.rabbitmq.com/consumer-prefetch.html#sharing-the-limit)

Motivation

If single consumer consumes from multiple queue it creates new channel and qos works only for single channel. We have multiple queues where load might be different at the specific point in time. If we set qos per channel we might get OOM so we must lower the value to the worst case (when each queue is fully occupied with high traffic). However, this has impact on consumer performance when only one queue at a time has high load. With global qos (shared channel) it should be possible.

Desired solution

Have a possibility to share channel for Receiver along with possibility to setup global qos.