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

Why does resetting rabbitmq qos not work #645

Open
cyoffuture opened this issue Oct 23, 2024 · 0 comments
Open

Why does resetting rabbitmq qos not work #645

cyoffuture opened this issue Oct 23, 2024 · 0 comments

Comments

@cyoffuture
Copy link

I first set prefetch_count to 2, and then I bind the queue to a consumer, and I do get 2 pieces of data at the same time, but then I reset prefetch_count, and it doesn't work, I don't get 4 pieces of data at once.

await channel.set_qos(prefetch_count=2, global_= False)

queue = await channel.get_queue(queue_name)

consume_tag = await queue.consume(on_message)

await asyncio.sleep(3)

# reset after 3s or more time
await channel.set_qos(prefetch_count=4 , global_= False)
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

No branches or pull requests

1 participant