feat(rabbitmq): add message queue management support

This commit is contained in:
Yann丶 authored and GitHub committed 2026-07-22 23:52:09 +08:00
1 parent 503d6748d4
commit 39e554369f
76 files changed
+14915 -707

No files matched your search

+9 -6
View File
@@ -96,6 +96,7 @@ import { invalidateTableMetadataCache } from "@/lib/metadata/tableMetadataCache"
import { MetadataTaskLimiter } from "@/lib/metadata/metadataTaskLimiter";
import i18n from "@/i18n";
import type { MqAdminConfig } from "@/types/mq";
import { RABBITMQ_MQ_TENANT, resolveMqSystemKindFromConnection } from "@/lib/mq/mqConsoleDefaults";
const PINNED_TREE_NODES_STORAGE_KEY = "dbx-pinned-tree-nodes";
const ACTIVE_CONNECTION_STORAGE_KEY = "dbx-active-connection";
@@ -119,9 +120,9 @@ function sidebarObjectGroupPageSize(): number {
function isFlatMqConnection(config: ConnectionConfig | undefined): boolean {
if (!config || config.db_type !== "mq") return false;
if (config.driver_profile === "kafka" || config.driver_profile === "rocketmq") return true;
if (config.driver_profile === "kafka" || config.driver_profile === "rocketmq" || config.driver_profile === "rabbitmq") return true;
const kind = (config.external_config as Partial<MqAdminConfig> | undefined)?.systemKind;
return kind === "kafka" || kind === "rocketmq";
return kind === "kafka" || kind === "rocketmq" || kind === "rabbitmq";
}
type ImportSource = "dbx" | "navicat" | "dbeaver" | "datagrip";
@@ -2561,15 +2562,17 @@ export const useConnectionStore = defineStore("connection", () => {
const config = getConfig(connectionId);
if (isFlatMqConnection(config)) {
// Kafka/RocketMQ have no tenant/namespace concept. Create a synthetic child
// that opens the MQ admin console directly when clicked.
// Kafka/RocketMQ have no tenant/namespace concept; RabbitMQ pins a synthetic
// tenant and exposes virtual hosts as namespaces inside the console. Create a
// synthetic child that opens the MQ admin console directly when clicked.
const mqTenant = resolveMqSystemKindFromConnection(config) === "rabbitmq" ? RABBITMQ_MQ_TENANT : "_flat_mq";
setChildren(node, [
{
id: schemaCacheKey(connectionId, "mq-tenant", "_flat_mq"),
id: schemaCacheKey(connectionId, "mq-tenant", mqTenant),
label: "Topics",
type: "mq-tenant" as const,
connectionId,
mqTenant: "_flat_mq",
mqTenant,
mqInitialTab: "topics",
},
]);