Skip to content

Definition export: inject default queue type into virtual host metadata#12821

Merged
michaelklishin merged 8 commits intomainfrom
rabbitmq-server-12776
Nov 27, 2024
Merged

Definition export: inject default queue type into virtual host metadata#12821
michaelklishin merged 8 commits intomainfrom
rabbitmq-server-12776

Conversation

@michaelklishin
Copy link
Copy Markdown
Collaborator

@michaelklishin michaelklishin commented Nov 26, 2024

With this change, GET /api/definitions and GET /api/vhosts will inject a default queue type (DQT) into virtual host metadata when default_queue_type is set in rabbitmq.conf (v4.0.x-only) and the virtual host in question does not have DQT defined for it:

default_queue_type = quorum

Closes #12776.
Closes #12835.

@mkuratczyk
Copy link
Copy Markdown
Contributor

All the parts you've worked on so far work well for me. There's one more endpoint which I think should
have the DQT: /api/definitions/vhost (eg /api/definitions/%2F). Right now it contains no metadata whatsoever right now and therefore no DQT.

Additionally, rabbitmqctl export_definitions (completely different code path unfortunately).

@michaelklishin michaelklishin marked this pull request as ready for review November 27, 2024 17:49
@michaelklishin
Copy link
Copy Markdown
Collaborator Author

@mkuratczyk ready for another round.

@michaelklishin michaelklishin changed the title Inject default queue type into virtual host metadata Definition export: inject default queue type into virtual host metadata Nov 27, 2024
Copy link
Copy Markdown
Contributor

@mkuratczyk mkuratczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, thanks. The only thing that I wasn't 100% sure about is that
if you export definitions with a DQT set and import them to a fresh node (that just defaults to classic), the DQT doesn't get set to the value from the definitions JSON.
But given that imports are additive, I think that's ok - we are not overriding an existing value.

@michaelklishin michaelklishin merged commit 1cae417 into main Nov 27, 2024
@michaelklishin michaelklishin deleted the rabbitmq-server-12776 branch November 27, 2024 19:53
michaelklishin added a commit that referenced this pull request Nov 27, 2024
Definition export: inject default queue type into virtual host metadata (backport #12821)
@michaelklishin michaelklishin added this to the 4.1.0 milestone Dec 19, 2025
mergify bot pushed a commit that referenced this pull request Dec 20, 2025
References #11541, #12109, #12821, #13837

(cherry picked from commit 467c11b)

# Conflicts:
#	deps/rabbit/Makefile
michaelklishin added a commit that referenced this pull request Dec 20, 2025
michaelklishin added a commit that referenced this pull request Dec 23, 2025
michaelklishin added a commit that referenced this pull request Dec 23, 2025
michaelklishin added a commit that referenced this pull request Dec 23, 2025
@michaelklishin
Copy link
Copy Markdown
Collaborator Author

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.

Introduce definition file type markers DQT defined in rabbitmq.conf is not injected into exported definitions

2 participants