Connector delivery

From robustmq/robustmq · View interactive version

Connector delivery is an AI agent skill from the GitHub repository robustmq/robustmq. Implements new RobustMQ MQTT connector integrations end-to-end using project conventions. Use when the user asks to add, implement, or support a new connector type such as webhook, opentsdb, clickhouse, influxdb, cassandra, mqtt bridge, or protocol-compatible targets.

How to use this skill

Skill file

Connector Delivery

Purpose

Deliver a new RobustMQ connector end-to-end with consistent patterns across:

Use this skill when the user asks: "add/support/implement <connector>".

Input Contract

Collect only missing essentials. If omitted, apply defaults and proceed.

  1. Connector type name (s3, kinesis, foo).
  2. Direction (default: sink/outbound).
  3. Required config fields.
  4. MQTT record -> target payload mapping.

Default assumptions

Fast-path command

If user says only "implement X connector", do this without extra questions:

  1. Build minimal usable config with strict validation.
  2. Implement sink writing with clear, deterministic mapping.
  3. Wire all registration points.
  4. Update both zh/en API and overview docs.
  5. Run targeted cargo check.

Implementation Workflow

1) Metadata Config

Files:

Requirements:

  1. Add config struct with Serialize, Deserialize, Clone, Debug, PartialEq.
  2. Add Default with practical defaults.
  3. Add validate(&self) -> Result<(), CommonError>:
  1. Export module in mod.rs.

Validation style:

2) ConnectorType Registration

File:

Required edits:

  1. Add CONNECTOR_TYPE_<TYPE> constant.
  2. Add enum variant in ConnectorType.
  3. Extend as_str().
  4. Extend FromStr with default config constructor.
  5. Add import for new config type.

Rule: no partial registration. All four points must be updated.

3) Runtime Connector Module

Files:

Implement ConnectorSink:

Mapping rules:

Error rules:

4) Runtime Wiring

Files:

Checklist:

5) Admin API Wiring

File:

Required edits:

  1. Allow connector type in validate_connector_type.
  2. Parse config in parse_connector_type.
  3. Ensure validate() is called on decoded config.

6) Failure Strategy Semantics

Never change global semantics while adding a connector.

Must preserve:

7) Documentation Sync

Update all relevant docs when connector is user-facing.

Files:

Document:

8) Validation and Checks

Run after edits:

  1. cargo check -p metadata-struct -p connector -p admin-server
  2. Lint check for touched Rust files.
  3. Confirm no missing match arms for ConnectorType.
  4. Confirm docs include type list + config section + example request.

File Matrix (must touch)

Output Format

Return concise delivery report:

  1. Files changed.
  2. Behavior and defaults.
  3. Known limitations.
  4. Suggested next verification command(s).

Use this completion template:

Implemented `<type>` connector end-to-end.

- Changed files: ...
- Runtime behavior: ...
- Config defaults: ...
- Limitations: ...
- Verify: `cargo check -p metadata-struct -p connector -p admin-server`

Guardrails

Common Pitfalls

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.