consumer prefetch locked to 2000 by default even with prefetch_count=0 #1349
pfribourg-ias
started this conversation in
General
Replies: 1 comment 5 replies
-
You understand that you eventually MUST acknowledge message delivery, correct? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a simple issue:
with a single consumer on a queue, I want to have unlimited messages prefetch (unacked coming in).
To do so, in the documentation, it is said to call
channel.basic_qos(prefetch_size=0, prefetch_count=0, global_qos=True)
but it just don't work, and my consumer is locked to 2000 messages prefetched, no more.
I use pika v1.2.0 as shown here :
Here is a sample producer that load 10 000 messages in a queue:
here is a sample consumer where I try to set unlimited prefetch count but it does not work and it lock at 2 000 messages:
here is a screen shot of RabbitMQ showing that only 2 000 message are prefetched:
I can raise prefetch_count up to 65 535 (the limit allowed) and I will be able to have 65 535 un-acked messages but I need unlimited un-acked messages.
I will take care of memory on the consumer side, I just want to have ALL message in, as a consumer.
The only way I found to have unlimited un-acked message is to manually call
channel.basic_get
but it is way slower than subscribe as a consumer.How should I do to have a single consumer using basic_consume & have as much message as I want in prefetch ?
Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions