# EMQX Fleets

EMQX Fleets is a fully managed IoT device management service in EMQX Cloud. Built on top of EMQX Broker, it adds the application layer that turns a message broker into a complete device fleet management platform, covering device registry, state synchronization, remote commands, and batch job dispatch.

## Why EMQX Fleets?

An MQTT broker solves the message transport problem. It does not answer questions like: which devices are online, what state is each device in, how do you push a configuration change and confirm the device applied it, or how do you track a firmware rollout across hundreds of devices.

Without Fleets, every team building on EMQX Cloud has to build that layer themselves: a device registry in their own database, a state-sync protocol on top of MQTT, a job scheduling system with per-device tracking. Fleets provides these as a managed service so you can focus on your application instead.

## Key Features

- **Device Registry**: Define device schemas with Thing Types, register individual devices as Things, and organize them into Thing Groups using tags.

- **Device Shadow**: A three-state model (reported, desired, delta) that keeps cloud intent and device reality in sync, even across disconnections. The cloud writes a desired state; the device converges toward it and reports back.

- **Device Query**: Search across your entire fleet using a SQL-like query language. Filter by connection status, shadow property values, tags, or groups.

- **Commands**: Send real-time request-response commands to individual devices (for example, lock, unlock, set temperature) and track execution status.

- **Jobs**: Dispatch batch operations to a group of devices and track per-device execution progress through its full lifecycle (queued, in progress, succeeded, failed, timed out).

## How It Works

Devices connect to EMQX Broker via MQTT or send data over HTTPS. EMQX's rule engine routes device messages to the Fleets backend. The Fleets service stores device metadata and the latest shadow state in PostgreSQL, and time-series data (events, shadow history) in EMQX Tables. Cloud-to-device communication (shadow updates, commands, job notifications) is delivered via EMQX Broker.

```text
Device  <──MQTT──>  EMQX Broker  <──>  Fleets Backend
  │                     │                    │
  └──HTTPS──────────────┘               PostgreSQL
                                         EMQX Tables
```

Fleets never subscribes to MQTT topics directly. All downlink communication uses the EMQX v5 REST API.

Each Fleets deployment is associated with one EMQX Broker deployment. Both deployments must be in the same project.

## When to Use EMQX Fleets

EMQX Fleets is designed for IoT application developers who need more than message transport. Consider Fleets if you:

- Need a persistent device registry with schema-based device models.
- Want to synchronize configuration or state between the cloud and devices reliably, including when devices are intermittently connected.
- Need to send commands to devices and confirm execution outcomes.
- Want to roll out firmware updates or configuration changes to a fleet and track per-device progress.
- Need to search or filter your device fleet by status, properties, or tags.

### Common Use Cases

- **Smart Hardware Management**: Track which devices are online, push configuration updates, and confirm devices applied them.
- **Industrial IoT**: Monitor equipment state remotely, send control commands, and log events for compliance and diagnostics.
- **Building Automation**: Manage thermostats, door locks, and sensors at scale, with reliable state sync and command acknowledgment.
- **Firmware Rollout**: Use Jobs to push a firmware update to a device group and monitor per-device success or failure.

## EMQX Fleets vs Other EMQX Cloud Products

| | EMQX Broker | EMQX Tables | EMQX Fleets |
|---|---|---|---|
| Primary function | MQTT message transport | Time-series data storage | IoT device management |
| What it manages | Message routing | Telemetry and time-series data | Device identity, state, commands, jobs |
| Typical user | Anyone using MQTT | Data engineers, analytics teams | IoT application developers |

## Plans and Pricing

EMQX Fleets is available on the **Starter** plan with pay-as-you-go billing.

| Specification | Value |
|---|---|
| Billing model | Pay as you go |
| Cloud platform | Google Cloud |
| Regions | Iowa (us-central1), Oregon (us-west1) |

For pricing details, contact EMQX Cloud support or your account representative.

## Next Steps

- [Get Started with EMQX Fleets](./emqx_fleets_quick_start.md)
- [Create an EMQX Fleets Deployment](./deployment/emqx_fleets_create_deployment.md)
