Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefetch of Quorum queues #276

Open
voyage34 opened this issue Oct 8, 2020 · 2 comments · May be fixed by #313
Open

Prefetch of Quorum queues #276

voyage34 opened this issue Oct 8, 2020 · 2 comments · May be fixed by #313

Comments

@voyage34
Copy link

voyage34 commented Oct 8, 2020

Quorum queues do not support global QoS prefetch (as specified here), whereas as I understand SimpleAmqpClient always invokes QoS with global=true.

Indeed, when BasicConsume is called with default message_prefetch_count, I get an exception. However, when it is called with message_prefetch_count=0, it returns fine, and (what's more surprising) I can even later do seemingly successful BasicQos calls...

Can I rely on this behavior or/and is there a more proper way of dealing with QoS on Quorum queues?

(v.2.6.0, according to Version.h.)

@mkomel
Copy link

mkomel commented Nov 30, 2022

I'm facing the same issue. SimpleAmqpClient BasicConsume does not work with message_prefetch_count>0 when used with quorum queues. Exception on the RabbitMQ broker says: "operation basic.consume caused a connection exception not_implemented: "queue ..... in vhost '/' does not support global qos"
Also, it's true that if message_prefetch_count=0 is used with BasicConsume, subsequent BasicQos calls do not fail, however those calls do not have any effect on the broker.

Any hints/info about this issue?

@mkomel
Copy link

mkomel commented Nov 30, 2022

The issue is here:

qos.global = m_impl->BrokerHasNewQosBehavior();

This always sets basic.qos.global to true when connected to newer RabbitMQ brokers.

A simple solution (and a more flexible API) would be to have a way to explicitly set this value when using BasicConsume
A quick ad-hoc solution, which works ok:
patch.txt

@mkomel mkomel linked a pull request Dec 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants