SpecsModelExplore
Overview
Actors
External Systems
IoT Platform
Edge
Ingestion
MQTT Broker
Command Router
Command RepositoryDelivery EnginePriority Queue
Stream Processing
Device Management
User-Facing Apps
Platform
SpecsModelExplore
Command Router
OverviewGuideCommand APILinks and Communications
IDproduct.ingestion.command_router
DescriptionDelivers cloud-to-device commands and tracks acks.
Keycommand_router
Typemicroservice:service
TeamIngestion
Owneringestion@iotgateway.example
Statusactive
TechnologiesGo, PostgreSQL, gRPC, MQTT
Attributesapi_style: REST + gRPC, rps: 5k
Tags
Table of contents
Guide
Command Router
Internal structure
Components
Delivery lifecycle
Queue
Deliver
Resolve
API
Related workflow
Command API

Guide

Command Router

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.

Internal structure

Could not build diagram for model "example-iot".

Components

Command Repository

Durable record of every command and its delivery attempts.

Delivery Engine

Sends commands over MQTT and waits for an ack within the deadline.

Priority Queue

Per-device ordering so urgent commands jump ahead of routine ones.

Delivery lifecycle

Accept

A command arrives via the API, is validated against the device, and is written to the Command Repository in pending state.

Queue

It is enqueued in the device’s Priority Queue so higher-priority commands are delivered first.

Deliver

The Delivery Engine publishes the command on the device’s command topic and starts the ack timer.

Resolve

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.

API

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.

Related workflow

Command dispatch is owned end-to-end by this service:

Command API

Links and Communications

1 incoming link · 1 workflow

Incoming Links(1)

Source objectLabelLink typeRelationRaw idRequiredDescription
MQTT Broker

example-iot.product.ingestion.mqtt_broker

microservice:broker
routes commands to—linksproduct.ingestion.command_router——

Related Workflows(1)

WorkflowModelParticipant idParticipant label
Command dispatch

commands.dispatch

example-iotproduct.ingestion.command_routerCommand router