rabbitmq / rabbitmq-server

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

DQT defined in `rabbitmq.conf` is not injected into exported definitions #12776

Open mkuratczyk opened 21 hours ago

mkuratczyk commented 21 hours ago

default_queue_type is not reflected in definitions export nor /api/vhosts. Additionally, it seems ineffective in 3.13.

Affected versions: 3.13, 4.0, main.

Reproduction steps:

echo 'default_queue_type = quorum' > /tmp/dqt.conf
make run-broker RABBITMQ_CONFIG_FILE=/tmp/dqt.conf

# export_definitions doesn't mention DQT
rabbitmqctl export_definitions - | jq | rg quorum

# /api/vhosts returns DQT as undefined
curl -u guest:guest -s localhost:15672/api/vhosts | jq | rg default_queue_type
    "default_queue_type": "undefined",

# the setting is effective nonetheless
rabbitmqadmin declare queue name=foo
rabbitmqctl -q list_queues name type
name    type
foo quorum

On v3.13.x, I get foo classic in that last command, so it seems like default_queue_type is not being applied at all. rabbitmqctl environment returns {default_queue_type,rabbit_quorum_queue} as expected.

michaelklishin commented 19 hours ago

@mkuratczyk in 3.13.x it will be effective for virtual hosts that have at least some metadata. It also can be configured per virtual host in 3.13.x and this is not a problem in 4.0.x. It's just 3.13.x ran out of community support before we have gotten to backport the fix and the test suite refactoring it depended on in main.

The docs for 3.13.x do not even mention default_queue_type in rabbitmq.conf any more for that reason.

As for injecting the default into definitions, we already do this for GET /api/queues/{vhost} and such, so it makes sense.