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 Repository
OverviewGuideSchemaLinks and Communications
IDproduct.ingestion.command_router.command_repo
DescriptionStores pending and delivered commands.
Keycommand_repo
Typecomponent:database
TeamIngestion
Owneringestion@iotgateway.example
Statusactive
TechnologiesPostgreSQL
Attributesretention: 90d, store: PostgreSQL
Tags
Table of contents
Guide
Command Repository
Data model
Notes
Schema

Guide

Command Repository

The Command Repository is the relational store behind the Command Router. It is the authoritative history of what was asked of a device, when, how many times we tried, and how it ended. Every status the API reports comes from here.

Storage profile

PostgreSQL, single logical database. Commands and their attempts are retained for 90 days for audit and debugging, then archived out of the hot path.

Data model

The schema is built around the command and its lifecycle: the command itself, each delivery attempt, the terminal result, and the (potentially large) payload split into its own table. The ERD is embedded on the Overview tab.

Notes

  • COMMAND.idempotency_key is unique, which is what makes the API’s idempotencyKey guarantee enforceable at the storage layer.
  • DELIVERY_ATTEMPT rows are append-only — one per try by the Delivery Engine — giving a full retry timeline per command.
  • COMMAND_PAYLOAD is separated from COMMAND so that listing and status queries stay fast and never drag large bodies through the index scans.

Schema

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
100%

Links and Communications

1 incoming link

Incoming Links(1)

Source objectLabelLink typeRelationRaw idRequiredDescription
Delivery Engine

example-iot.product.ingestion.command_router.delivery_engine

component
loads commands from—linksproduct.ingestion.command_router.command_repo——