Skip to content

Conversation

@the-mikedavis
Copy link
Collaborator

The prior validation for vhosts' default queue types ensures that the default queue type can be declared. This seems slightly heavy-handed since users might never rely on default-queue-type behavior. Instead the creation of the vhost should succeed but warn the user that declarations relying on the default queue type will fail - the is_enabled/0 callback of rabbit_queue_type should be limited to block queue declarations, and not block the creation of a vhost.

This is a follow-up to #14624

The prior validation for vhosts' default queue types ensures that the
default queue type can be declared. This seems slightly heavy-handed
since users might never rely on default-queue-type behavior. Instead
the creation of the vhost should succeed but warn the user that
declarations relying on the default queue type will fail - the
`is_enabled/0` callback of `rabbit_queue_type` should be limited to
block queue declarations, and not block the creation of a vhost.
@the-mikedavis
Copy link
Collaborator Author

An alternative to this change could be to make no changes at all. The problem being solved here is: if you set queue_types.classic.enabled = false in config then boot-up fails from declaring the default vhost with the default queue type. If you want to really want to prevent classic queue creation you would also want to update the default queue type as well as this config option. So we could make no changes instead, although it would be a bit of a footgun.

@michaelklishin
Copy link
Collaborator

@the-mikedavis I'm leaning towards the latter because updating the DQT is not entirely trivial per https://www.rabbitmq.com/docs/vhosts#default-queue-type.

I have thought of a command that would update (via a merge) a virtual host's metadata, including the DQT, but I don't think we have something like that.

So at the moment, the virtual host declaration must fail early.

@the-mikedavis the-mikedavis deleted the md/vhost-declare-queue-type-enabled branch October 6, 2025 19:23
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

Successfully merging this pull request may close these issues.

3 participants