Add missing QUEUE_TYPE for rabbit_mqtt_qos0_queue#15524
Draft
MarcialRosales wants to merge 2 commits intomainfrom
Draft
Add missing QUEUE_TYPE for rabbit_mqtt_qos0_queue#15524MarcialRosales wants to merge 2 commits intomainfrom
MarcialRosales wants to merge 2 commits intomainfrom
Conversation
This change is not absolutely required for OSS RabbitMQ because the function get_queue_type returns classic if the queue type is not classic, quorum or stream. however, in Tanzu, get_queue_type returns the raw type without any default behavaiour hence rabbit_mqtt_qos0_queue types fail to render.
when get_message action is enabled and not template was configured. This code is necessary for backward comppatibilities because in the past the queue.ejs template had inline get_message html code. However very recently, that html chunk is now delivered from a separate template configured in the QueueType.tmpl.get_message attribute. It can happen that plugins outside from rabbitmq-server rely on the previous behaviour, i.e. get_message section was already in place and they did not have configure any. For instance, rabbitmq_delayed_message plugin has get_message action enabled but it does not have the get_message template declared on its queue type. Thanks to this code, it will have a template.
ansd
reviewed
Feb 20, 2026
Comment on lines
+1004
to
+1008
| policy_apply_to: "rabbit_mqtt_qos0_queue", | ||
| actions: { | ||
| get_message: true, | ||
| purge: true | ||
| }, |
Member
There was a problem hiding this comment.
Note that the MQTT QoS 0 queue type does not support policies. Neither can messages be received from this queue type via the Management UI nor can this queue type be purged.
Contributor
|
I think you can just remove that "if" for DQ. ping me once this pr is merged and I will update DQ's stuff (copy paste that classic queue template). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has two changes relative to the management ui.
This change is not strictly required for OSS RabbitMQ, because there get_queue_type falls back to classic when the queue type is not classic, quorum, or stream. In Tanzu RabbitMQ, by contrast, get_queue_type returns the actual queue type with no such fallback, so queue types like rabbit_mqtt_qos0_queue are not treated as classic and the UI would try to render them without a default. The fallback to the classic get-message template is what makes those queue types render correctly in Tanzu.
Use
classic-queue-get-messagetemplate whenget_messageaction is enabled and not template was configured.This code keeps backward compatibility with how the get-message UI used to work. Originally, the queue page (queue.ejs) contained the get-message HTML inline. It has since been moved into a separate template that is selected via the queue type’s QueueType.tmpl.get_message attribute.
Some plugins outside rabbitmq-server were written for the old behaviour: they enable the get-message action but never set a get-message template, because the UI was always present. The RabbitMQ Delayed Message plugin is one example: it enables the get-message action but does not declare get_message on its queue type. With this fallback, such queue types still get a template (the classic-queue get-message template) and the UI continues to work without requiring those plugins to be updated.
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that apply