Conference
Meet EMQ at SPS 2026: Real-Time Data for Industrial AI →

Rule Engine

Process MQTT data in real time

Filter, transform, and route MQTT messages to databases and cloud services with SQL rules or the visual Flow Designer.

SELECT
  payload,
  'overheat' AS alert,
  'critical' AS severity
FROM
  "factory/+/status"
WHERE
  payload.temp > 45

Core features

Filter, transform, and route MQTT data

Use SQL, client events, built-in functions, schemas, and extensions to shape your MQTT data flows.

Filter, transform, and analyze incoming data streams with SQL.

Explore rule SQL

SQL rule

SELECT
  payload,
  now_timestamp() as processed_at
FROM "sensor/+/data"
WHERE payload.temperature > 30

Input

{"device_id": "sensor-042", "temperature": 35.2, "humidity": 68}

Output

{"payload": {"device_id": "sensor-042", "temperature": 35.2, "humidity": 68}, "processed_at": 1768461629}

Flow Designer

Build data flows visually

Arrange your data flow with drag-and-drop controls, then work with the same rules in SQL.

Example flow

Drag nodes to arrange your flow. Drag the canvas to pan, or use the zoom controls.

Visual interface

Create workflows by dragging and arranging nodes in the visual editor.

SQL interoperability

Switch between the visual editor and SQL while keeping rules in sync.

50+ integrations

Connect to databases, message queues, and cloud services.

Built-in testing

Test workflows with simulated or real data before deployment.

Benefits

Simplify your MQTT data pipeline

Use built-in processing tools to reduce custom development and act on incoming data.

Reusable SQL rules

Filter, transform, and route MQTT messages with reusable SQL rules.

Event-driven actions

Run actions when messages or client events match your rules.

Less custom code

Use built-in functions and integrations to reduce custom development.

High-throughput processing

Process high message throughput across large numbers of device connections.

Build your first MQTT data flow with EMQX