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
Priority Queue
Ordering model
Behaviour
SpecsModelExplore
Priority Queue
OverviewGuideLinks and Communications

Priority Queue

The Priority Queue decides which command goes next for each device. It is a per-device ordered queue that lets a high-priority command — say an emergency shutdown — overtake a backlog of routine configuration pushes.

Why per-device

A device processes one command at a time and may be offline for long stretches. Ordering per device keeps a slow or absent device from blocking delivery to the rest of the fleet.

Ordering model

Each device has its own queue implemented as a Redis sorted set, scored by (priority, enqueue_time):

Lower priority numbers are delivered first (0 = most urgent, 9 = routine), so critical commands always jump the line.

Behaviour

  • The Delivery Engine pops the head of a device’s queue when it is ready to send the next command.
  • An item is only removed once it reaches a terminal state; a command being retried stays at the head so ordering is preserved across attempts.
  • Queues are ephemeral routing state in Redis — the durable record always lives in the Command Repository.