SpecsModelExploreRequirements
SpecsModelExploreRequirements
Priority Queue
Overview
Guide
Twin streams
Links and Communications
IDproduct.ingestion.command_router.priority_queue
DescriptionPer-device priority queue for commands.
Keypriority_queue
Typecomponent:broker
Statusactive
TeamIngestion
Owner
ingestion@iotgateway.example
TechnologiesRedis
Tags
Table of contents
Guide
Priority Queue
Ordering model
Behaviour
Links and Communications
Requirements

Attributes

orderingpriority
storeRedis

Guide

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.

Links and Communications

1 workflow

Related Workflows(1)

WorkflowModelParticipant idParticipant label
Command dispatch

commands.dispatch

example-iotproduct.ingestion.command_router.priority_queuePriority queue

Requirements