| ID | product.ingestion.command_router |
|---|---|
| Description | Delivers cloud-to-device commands and tracks acks. |
| Key | command_router |
| Type | microservice:service |
| Team | Ingestion |
| Owner | ingestion@iotgateway.example |
| Status | active |
| Technologies | Go, PostgreSQL, gRPC, MQTT |
| Attributes | api_style: REST + gRPC, rps: 5k |
| Tags |
The Command Router is the cloud-to-device direction of Ingestion. Callers issue a command for a device; the router persists it, queues it by priority, delivers it over the broker, and tracks the acknowledgement until the command succeeds, expires or is cancelled.
Responsibility in one sentence
Accept a command, guarantee at-least-once delivery to the device, and report back an authoritative terminal status.
Could not build diagram for model "example-iot".
A command arrives via the API, is validated against the device, and is written
to the Command Repository
in pending state.
It is enqueued in the device’s Priority Queue so higher-priority commands are delivered first.
The Delivery Engine publishes the command on the device’s command topic and starts the ack timer.
On ack the command moves to succeeded; on timeout it is retried up to a limit
and then marked failed. Callers can poll status or cancel an in-flight command.
The router exposes a small REST surface to issue, list, inspect and cancel commands. The full contract is embedded below on the Overview tab.
Command submission is idempotent on a client-supplied idempotencyKey, so a
retried HTTP request never enqueues the same physical command twice.
Command dispatch is owned end-to-end by this service:
1 incoming link · 1 workflow
| Source object | Label | Link type | Relation | Raw id | Required | Description | |
|---|---|---|---|---|---|---|---|
| routes commands to | — | links | product.ingestion.command_router | — | — |
| Workflow | Model | Participant id | Participant label |
|---|---|---|---|
| Command dispatch commands.dispatch | example-iot | product.ingestion.command_router | Command router |