mq-middleware

Integrate and orchestrate Kafka and RabbitMQ messaging for the toLink-Rag platform.

5|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/ql-link/LinkRag --skill mq-middleware
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mq-middleware
Source: https://github.com/ql-link/LinkRag/tree/main/.ai/skills/mq-middleware
Command: npx skills add https://github.com/ql-link/LinkRag --skill mq-middleware

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

指导 LLM 如何使用 toLink-Rag 的 MQ 消息中台,统一收发、定义新消息类型并处理多厂商适配逻辑。

Core Features & Use Cases

  • 支持多 MQ厂商适配,通过 MQFactory 实现 Kafka/RabbitMQ 切换,统一发送/订阅入口。
  • 提供标准化的消息定义与 payload 结构,方便新增消息类型并保持向后兼容。
  • 启动阶段可选初始化 Kafka Topics,确保 parse_task/parse_result 等核心通道就绪。

Quick Start

在配置好 MQ_VENDOR、初始化开关以及必要的环境依赖后,使用 MQService 进行发送或订阅来实现异步任务处理。

Frequently Asked Questions about mq-middleware

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I coordinate Kafka and RabbitMQ messaging within a unified service interface?▼

To coordinate Kafka and RabbitMQ messaging, you can use a vendor-agnostic MQFactory adapter that provides a unified entry point for sending and subscribing across multiple MQ vendors.

How do I define new MQ message types while maintaining backward compatibility?▼

Defining new MQ message types requires using standardized payload structures provided by the MQ middleware, ensuring that new additions maintain backward compatibility across existing consumers.

Can I switch between Kafka and RabbitMQ in production environments without changing application code?▼

Yes, you can switch between Kafka and RabbitMQ in production by configuring the MQ_VENDOR switch, which routes traffic through the appropriate vendor-agnostic adapter without code changes.

Do I need to manually initialize Kafka topics before sending or subscribing to messages?▼

You do not necessarily need to manually initialize Kafka topics; the middleware supports optional startup initialization to ensure core channels like parse_task and parse_result are ready.

What is the best way to handle asynchronous task processing across multiple MQ vendors?▼

The best way to handle asynchronous task processing across multiple MQ vendors is to route send and subscribe operations through a centralized MQService interface that abstracts vendor-specific logic.