Teams decide to migrate from HiveMQ for different reasons. Some run HiveMQ Cloud Serverless, which retires on December 31, 2026. Some pay for an Enterprise license mostly to get a dashboard and access control. Others run the Community Edition on a VM and are tired of patching it. The destination may be the same, but the starting points are very different: a console with a few credentials, or a cluster with ten extensions and a credentials.xml that grew over five years.
hivemq-migration-skills is an open-source pair of AI agent skills that handles all three. Install it in Claude Code, or any agent that reads SKILL.md skills, and the agent becomes a migration engineer who knows both HiveMQ and ConnectMQ. It audits what you have, plans the move with real numbers, runs both brokers in parallel and moves your clients in waves you can roll back. This post walks through how it works.
Why Migrating from HiveMQ Needs a Plan
The MQTT protocol is the easy part: ConnectMQ speaks standard MQTT 3.1.1 and 5, so your client libraries stay the same. The risk lies in everything around the protocol:
- Identity. HiveMQ accepts any client ID and authenticates however your extensions say. ConnectMQ issues credentials in its console and expects client IDs of the form
<ISSUED_ID>_<suffix>. - Extensions. Kafka, database, Data Hub and custom Java extensions do work that nobody sees until it stops. Each one needs a replacement service or a decision to drop it.
- Defaults. HiveMQ allows 256 MB packets and keeps sessions almost forever. ConnectMQ plans cap message size and session expiry, so large payloads and sleepy devices need attention.
- Deadlines. For Serverless users, a missed wave means devices that simply stop connecting.
The skills turn each of these into a concrete check, so problems show up in the plan instead of during the cutover.
Two Skills: Planner and Executor
The repository contains two skills that share a reference file with the facts about the target: endpoints, credential and client ID rules, the access control model, plan limits and reason codes.
| Skill | Role |
|---|---|
hivemq-migration-planner |
Works out the HiveMQ flavour, audits configuration and extensions, measures the workload, converts permissions, maps client IDs, writes migration/plan.md |
hivemq-migration-executor |
Verifies ConnectMQ, builds the parallel run, copies retained state, validates both sides, runs waves, rolls back, decommissions |
The planner hands over a written plan. The executor refuses to improvise waves without one.
Step One: Know Which HiveMQ You Are Leaving
The planner's first question is which HiveMQ you run, because that decides what can be automated:
| Flavour | Audit input | Parallel run |
|---|---|---|
| Community Edition | config.xml, extensions/ |
relay.py |
| Enterprise / Platform | config.xml, extensions/, Control Center, REST API |
Enterprise Bridge Extension or relay.py |
| HiveMQ Cloud | Console only | relay.py |
For self-hosted brokers, the audit script does the reading:
python scripts/hivemq_audit.py --config /opt/hivemq/conf/config.xml \
--extensions /opt/hivemq/extensions --out migration/
It walks through listeners, mqtt limits, restrictions, security and cluster settings, and every extension that is not disabled. Each finding lands in one of four groups. A TLS listener with client-authentication-mode set to REQUIRED is a blocker, because ConnectMQ authenticates with username and password over TLS. A custom WebSocket path is an action, since ConnectMQ always serves /mqtt on port 8084. A session-expiry of a week or a max-packet-size of 1 MB becomes a plan check. The Kafka extension becomes a blocker with a clear replacement: a consumer service that reads from ConnectMQ through a shared subscription and produces to Kafka.
For HiveMQ Cloud, there is no file to read. The planner walks you through a table of credentials, permissions and the clients that use each one, and fills the same outputs by hand.
Converting File RBAC Permissions
If you use the File RBAC extension, credentials.xml holds your users, roles and topic permissions. The audit script converts it into ConnectMQ access control rules. Passwords are never read.
- Each permission becomes one rule per user:
PUBLISH,SUBSCRIBEandALLmap topublish,subscribeandall. ${{username}}in a user's permission is replaced with that user's old name, so the topic tree keeps its shape while the rule's subject becomes the new ConnectMQ username.${{clientid}}permissions are expanded into one rule per client when you pass the client map, keeping the old client IDs in topics. Without the map, they become${clientid}with a warning that the value now includes the issued prefix.- Restrictions ConnectMQ does not express, such as QoS, retained-only or shared-group limits, are flagged so you can enforce them in the clients.
- Because File RBAC denies whatever it does not grant, the rule table uses a
denyno-match policy.
The Enterprise Security Extension is a different story. SQL, LDAP and JWT realms cannot be read offline, so the audit marks ESE as a blocker and the planner helps you rebuild the permissions table by hand. Background on rule design: MQTT ACL.
Measuring the Workload Before Choosing a Plan
Sizing uses numbers, not device counts. On Enterprise, the REST API lists connected clients and Control Center shows connection and message rates. On Community Edition, the planner falls back to logs, the Prometheus extension or a monitoring subscriber. On HiveMQ Cloud, it uses the console metrics.
The fit check separates concurrent connections from session minutes. Sixty devices that connect for thirty seconds every ten minutes rarely have more than ten connections open at once, and they use about 130,000 session minutes a month, so they fit comfortably on Basic. The same sixty devices always on would need over 2.5 million minutes, and that points to Scale. The HiveMQ migration checklist covers the same measurements if you want to collect them by hand.
Client IDs come from the REST API export or your provisioning records and go through client_id_map.py, which prefixes each one with the issued ID and flags spaces, wildcards and IDs that differ only by case. More on why that matters: MQTT client ID.
Running HiveMQ and ConnectMQ in Parallel
The executor's main job is to keep both brokers in sync while clients move.
On Enterprise and Platform, the HiveMQ Enterprise Bridge Extension connects to ConnectMQ on port 8883 with TLS and the bridge credential. Topics in PUB mode carry device data to ConnectMQ, and topics in SUB mode bring commands back (SUB needs an MQTT 5 remote, which ConnectMQ is). The skill insists on an explicit client ID of the form <ISSUED_ID>_bridge, and on a single bridge connection per cluster, so nodes do not take over each other's session.
On Community Edition and HiveMQ Cloud, the bundled relay.py does the same job from outside both brokers:
python scripts/relay.py --source mqtts://xxxx.s1.eu.hivemq.cloud:8883 \
--source-client-id connectmq-relay --target mqtts://BROKER_HOST:8883 \
--forward 'devices/+/telemetry' --reverse 'devices/+/commands/#'
It refuses to start when forward and reverse filters overlap. Because both sides speak MQTT 5, it also tags relayed messages and subscribes with no-local, so a message never bounces back. Retained state published before the parallel run started is copied once with copy_retained.py. Then compare_streams.py subscribes on both brokers and confirms that topics, counts and payloads match.
Moving Clients in Waves
Consumers move first. Backends, dashboards and the services that replace your extensions start reading from ConnectMQ while devices still publish to HiveMQ. Canary devices follow, then larger waves. Each wave has a go/no-go checklist, a soak period and clear rollback triggers. The executor watches for the reason codes that typically show up after a migration from HiveMQ: 0x85 for a client ID without the issued prefix, 0x86 for leftover credentials, and 0x97 for payloads above the plan's message size. If a wave fails, the previous client configuration is the rollback, because the bridge or relay is still running. Our zero-downtime HiveMQ migration and client reconfiguration guides go deeper into both topics.
When the last wave has soaked, the executor removes the bridge or stops the relay, watches HiveMQ for stragglers, and only then helps you cancel the cluster or license.
Getting Started
Install in Claude Code:
/plugin marketplace add connectmq/hivemq-migration-skills
/plugin install hivemq-migration-skills@connectmq-hivemq-migration
You can also copy skills/ into ~/.claude/skills/, or zip a skill folder for Claude.ai. The audit script needs only Python; the MQTT scripts need paho-mqtt 2.x. Then ask: "We are on HiveMQ Cloud Serverless with 40 devices, plan the move to ConnectMQ."
If you are still comparing options, start with HiveMQ Cloud Serverless end of life and the managed MQTT broker overview. The collection also covers Mosquitto, EMQX, VerneMQ, AWS IoT Core and Azure IoT Hub.
Frequently Asked Questions
Can these skills migrate from HiveMQ Cloud Serverless?
Yes. HiveMQ Cloud has no configuration files, so the planner builds the credential and permission inventory with you from the console, and the executor uses relay.py for the parallel run. Plan the last wave well before December 31, 2026.
Do I need a HiveMQ Enterprise license for the parallel run?
No. The Enterprise Bridge Extension is one option for licensed installations. The relay script works with Community Edition, HiveMQ Cloud and Enterprise alike, and needs only a HiveMQ credential that can publish and subscribe on the bridged topics.
What happens to my HiveMQ extensions?
Extensions do not run on ConnectMQ. The audit lists every enabled extension with a replacement: Kafka and database extensions become small subscriber services, File RBAC becomes access control rules, and custom Java logic moves into a client-side service. Each replacement goes live before devices move.
Can I keep my HiveMQ credentials and client IDs?
No. ConnectMQ generates credentials, and client IDs must start with the issued ID. The skills plan one configuration change per client (host, credentials and client ID together) and generate the client ID map.
Are the skills free to use?
Yes. The skills and scripts are MIT licensed on GitHub, and pull requests with new HiveMQ settings, extensions or migration patterns are welcome.



