How global and consumer-specific QoS updates correspond #10174
-
Describe the bugHi, While updating the QoS of a consumer after channel creation, I’ve noticed that the prefetch count of a consumer is not correctly set. Initially, the channel was created with a QoS of a value 1. At this point, new QoS with a prefetch of 5 is sent to a broker. Reproduction steps
Expected behavior
Additional contextI also have tested the behaviour of a channel with a BasicQoS having a I would like to update the prefetch count of an active consumer. What steps I should follow to reflect the changes on a consumer? As a note, I found this in the AMQP protocol documentation https://www.rabbitmq.com/resources/specs/amqp0-9-1.extended.xml,
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
RabbitMQ deviates from the AMQP 0-9-1 spec, this has been documented for years. Global updates to QoS cause a lot more trouble than they are worth, hence the deprecation. |
Beta Was this translation helpful? Give feedback.
-
Linking this to a discussion on-going in the celery community: celery/celery#6067 (comment) Celery uses dynamically updating prefetch values to implement it's delayed message / ETA task types - my understanding is that if a message is delivered to a consumer which shouldn't be executed for a while it is held and the prefetch count is bumped by one to accommodate it being held. The original use case for this issue being created was to support developers of consumers not knowing/caring up front about exact details of expected message throughput and allowing some kind of 'sensible default' which could change as throughput changes. Statically configured prefetch values do require some quite careful up front consideration which isn't trivial in some cases. With these two use cases it does feel to me like updating existing consumer prefetch values would be a useful RabbitMQ feature. Any thoughts @michaelklishin ? |
Beta Was this translation helpful? Give feedback.
-
A related discussion #11955. |
Beta Was this translation helpful? Give feedback.
RabbitMQ deviates from the AMQP 0-9-1 spec, this has been documented for years.
Global updates to QoS cause a lot more trouble than they are worth, hence the deprecation.
Dynamically controlled prefetch in general creates more confusion and unexpected behavior than it helps, well, anything.