rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
11.84k stars 3.9k forks source link

Make 'queue.declare' aware of virtual host DQT at validation time (backport #11541) #11548

Closed mergify[bot] closed 1 week ago

mergify[bot] commented 1 week ago

DQT = default queue type.

Determining what queue type should be used is getting more and more involved.

It can come from four different places:

  1. The client (as an x-queue-type argument value) or the HTTP API
  2. Virtual host metadata
  3. Node-wide default from rabbitmq.conf
  4. If all else fails, the fallback ("classic")

In addition, there are two ways to specify a type:

  1. Clients use shortcuts such as "quorum"
  2. Definitions and many places internally use module names such as rabbit_classic_queue

When a client provides no queue type, validation should take the defaults (virtual host, global, and the last resort fallback) into account instead of considering the type to be "undefined".

References #11457 ##11528.


This is an automatic backport of pull request #11541 done by Mergify.

mergify[bot] commented 1 week ago

Cherry-pick of f3b7a346f9b03f5ae348d03d362b71b86cd71ca2 has failed:

On branch mergify/bp/v3.13.x/pr-11541
Your branch is up to date with 'origin/v3.13.x'.

You are currently cherry-picking commit f3b7a346f9.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
    modified:   deps/rabbit/src/rabbit_amqqueue.erl
    modified:   deps/rabbitmq_management/test/stats_SUITE.erl

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   deps/rabbit/src/rabbit_queue_type.erl
    both modified:   deps/rabbit/src/rabbit_vhost.erl

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

michaelklishin commented 1 week ago

@mergifyio rebase

mergify[bot] commented 1 week ago

rebase

✅ Branch has been successfully rebased

michaelklishin commented 1 week ago

Backported to v3.13.x manually.