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

A way to preconfigure prefetch for new channels #1367

Closed
pwhittlesea opened this issue Sep 19, 2017 · 2 comments
Closed

A way to preconfigure prefetch for new channels #1367

pwhittlesea opened this issue Sep 19, 2017 · 2 comments
Assignees
Milestone

Comments

@pwhittlesea
Copy link

I'm currently running a RabbitMQ server where customers are connecting to queues created by myself.

Importantly, I do not have control over the client code that they write, and by extension, the connection.

Currently I have a customer who is not acknowledging messages and has not set the QOS prefetch option on their connection. The result of this is that my server collects unacknowledged messages until it runs out of memory.

I have the option of turning on the lazy option but I believe that this will just result in my server running out of disk space as the default prefetch limit is 0 (unlimited).
I have created a max-length policy but this does not seem to affect unacknowledged messages.

It has been suggested that I just ask the customer to set this option or fix their code to acknowledge messages however this does not seem a long term solution.
I am unable to ensure that my customers behave correctly all the time.

Is it possible to set defaults (on the queue/user or globally) such that the number of unacknowledged is bounded?

Thanks in advance!

@carlhoerberg
Copy link
Contributor

IMHO it's a pretty valid "feature request", or bug report, depending on how you look at it. Let the server set a max-prefetch. Anyone can pretty easily crash a RabbitMQ server by not setting the prefetch limit (or set it to 0) and then just start consuming a long queue. Either a rough client or by mistake.

@michaelklishin michaelklishin changed the title Question: Default prefetch for new connections A way to preconfigure prefetch for new channels Sep 19, 2017
@michaelklishin
Copy link
Member

I don't see anything that would prevent such feature in the spec (e.g. by dictating the default). It's true that misbehaving clients that consume but never ack deliveries can put an unreasonable amount of stress on a node.

This will be investigated for 3.7.0 as an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants