SpecsModelExplore
Overview
Actors
External Systems
IoT Platform
Edge
Ingestion
MQTT Broker
TLS ListenerTopic RouterSession Store
Command Router
Stream Processing
Device Management
User-Facing Apps
Platform
SpecsModelExplore
Topic Router
OverviewGuideLinks and Communications
IDproduct.ingestion.mqtt_broker.topic_router
DescriptionRoutes published messages to subscribers.
Keytopic_router
Typecomponent
TeamIngestion
Owneringestion@iotgateway.example
Statusactive
TechnologiesGo, MQTT
Attributesmatch: trie, throughput: 1M msgs/s
Tags
Table of contents
Guide
Topic Router
Matching
Behaviour

Guide

Topic Router

The Topic Router is the heart of the broker’s pub/sub. Every published message is matched against the set of active subscriptions and delivered to the clients whose topic filters match — in both directions, telemetry going up and commands coming down.

Topic shape

Telemetry flows on devices/{deviceId}/telemetry/# and commands flow on devices/{deviceId}/commands. Keeping device id high in the hierarchy lets the router prune whole branches of the match trie quickly.

Matching

Subscriptions are kept in a topic trie so that a single publish can be matched against millions of filters without scanning them linearly. Wildcards are handled at the node level:

devices/+/telemetry matches one segment — every device’s telemetry root, but not nested sub-topics.

Behaviour

  • Authenticated connections arrive from the TLS Listener; the router never sees an unauthenticated client.
  • Matching is per-message and lock-light: the trie is updated on subscribe / unsubscribe and read on every publish.
  • Delivery hands off to the session layer, which applies the per-subscription QoS and queues messages for offline clients.

Links and Communications

1 incoming link · 1 outgoing link

Incoming Links(1)

Source objectLabelLink typeRelationRaw idRequiredDescription
Session Store

example-iot.product.ingestion.mqtt_broker.session_store

component:database
persists sessions for—linksproduct.ingestion.mqtt_broker.topic_router——

Outgoing Links(1)

Target objectLabelLink typeRelationRaw idRequiredDescription
TLS Listener

example-iot.product.ingestion.mqtt_broker.tls_listener

component
routes traffic from—linksproduct.ingestion.mqtt_broker.tls_listener——