SpecsModelExploreRequirements
SpecsModelExploreRequirements
Command Router
Overview
Guide
Command API
MQTT commands
Twin streams
Links and Communications
IDproduct.ingestion.command_router
DescriptionDelivers cloud-to-device commands and tracks acks.
Keycommand_router
Typemicroservice:service
Statusactive
TeamIngestion
Owner
ingestion@iotgateway.example
TechnologiesGo, PostgreSQL, gRPC, MQTT
Tags
Table of contents
Guide
Command Router
Internal structure
Components
Delivery lifecycle
Queue
Deliver
Resolve
API
Related workflow
Command API
MQTT commands
Links and Communications
Requirements

Attributes

api_styleREST + gRPC
rps5k

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

MQTT commands

Links and Communications

1 incoming link · 1 workflow · 1 async channel

Incoming Links(1)

Source objectLabelLink typeRelationRaw idRequiredDescription
MQTT Broker

example-iot.product.ingestion.mqtt_broker

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

Async links(1)

Produces(1)

ChannelBrokerCaptureConsumer

Device commands

commands · mqtt_topic

MQTT Brokerproduct.ingestion.mqtt_broker
—
  • MQTT Publisher

Related Workflows(1)

WorkflowModelParticipant idParticipant label
Command dispatch

commands.dispatch

example-iotproduct.ingestion.command_routerCommand router

Requirements