SpecsModelExploreRequirements
SpecsModelExploreRequirements
Topic Router
Overview
Guide
Twin streams
Links and Communications
IDproduct.ingestion.mqtt_broker.topic_router
DescriptionRoutes published messages to subscribers.
Keytopic_router
Typecomponent
Statusactive
TeamIngestion
Owner
ingestion@iotgateway.example
TechnologiesGo, MQTT
Tags
Table of contents
Guide
Topic Router
Matching
Behaviour
Links and Communications
Requirements

Attributes

matchtrie
throughput1M msgs/s

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——

Requirements