rabbitmq-server icon indicating copy to clipboard operation
rabbitmq-server copied to clipboard

queue limit per node

Open SimonUnge opened this issue 1 year ago • 0 comments

if anyone would like to look at the code for any crazyness, please point it out. I would specifically want a pointer on better way to count queues per node. Counters maybe?

Proposed Changes

As per discussion https://github.com/rabbitmq/rabbitmq-server/discussions/10748

Added hard limit check for queues per node, with the following logic:

Exclusive queues Regardless of type (classic, classic mirror, QQ, Stream...), if the limit is reached on the node that receives the declaration request, the request is denied, and the CONNECTION is terminated.

Non Exclusive queues For QQ, Stream and Classic MIRROR Queue: If the limit is reached on the node that receives the declaration request, the request is denied with the CHANNEL terminated.

For Classic Queue that is NOT mirrored: If the limit is reached on the node that receives the declaration request, see if any other node in the cluster has capacity. If yes, redirect the declaration to that node. If no, the request is denied with the CHANNEL terminated.

Types of Changes

What types of changes does your code introduce to this project? Put an x in the boxes that apply

  • [ ] Bug fix (non-breaking change which fixes issue #NNNN)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • [ ] Documentation improvements (corrections, new content, etc)
  • [ ] Cosmetic change (whitespace, formatting, etc)
  • [ ] Build system and/or CI

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask on the mailing list. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [x] I have read the CONTRIBUTING.md document
  • [x] I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] All tests pass locally with my changes
  • [x] If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • [x] If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.

SimonUnge avatar Apr 24 '24 23:04 SimonUnge