Forward MQTT messages to a Kafka topic using the EMQX rule engine and Kafka Producer sink

domain: docs.emqx.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Pre-create the target Kafka topic(s) unless auto topic creation is enabled
  2. Under Integration > Connectors, create a Kafka Producer connector with the Kafka bootstrap servers and any required SSL/SASL authentication
  3. Under Integration > Rules, create a rule with SQL such as SELECT payload, topic FROM "t/#" to select the MQTT messages to forward
  4. Add an Action to the rule of type Kafka Producer, referencing the connector and setting the target Kafka topic (static or a templated field)
  5. Test the rule using the built-in SQL test pane, then confirm delivery with a Kafka consumer
  6. Monitor the integration via EMQX's data integration view for delivery errors

Known gotchas

Related routes

Design MQTT topics and message flow for industrial telemetry using the Sparkplug B specification
sparkplug.eclipse.org · 6 steps · unrated
Design a Kafka topic and schema strategy for streaming real-time vehicle telemetry from a fleet into downstream consumers.
kafka.apache.org · 5 steps · unrated
Apply Kafka Connect Single Message Transforms for topic routing and field masking
kafka.apache.org · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans