Topics
Topics are named, typed data channels that connect nodes together. Think of them as pipes that carry data from one node’s output to another node’s input. Topics ensure type safety—only compatible data types can flow through a connection.What is a Topic?
A topic is a communication channel that:- Carries data from an output port to an input port
- Has a name that identifies it (e.g.,
temperature_readings,sensor_data) - Has a type defined by a schema (e.g.,
TemperatureReading,SensorData) - Ensures type safety by preventing incompatible connections
Topics are similar to message queues or channels in other systems, but they’re automatically created when you connect nodes and are strongly typed for safety.
Why Use Topics?
Type Safety
Topics enforce type compatibility at connection time, preventing runtime errors from mismatched data types.
Automatic Creation
Topics are created automatically when you connect nodes. No manual setup required.
Named Channels
Each topic has a meaningful name, making it easy to understand data flow in your graph.
Decoupling
Nodes don’t need to know about each other—they only know about the topics they publish to or subscribe from.
How Topics Work
When you connect two nodes:- Connection is made - You drag from an output port to an input port
- Topic is created - A topic is automatically created with a default name
- Type is validated - The editor ensures output and input types are compatible
- Data flows - When the source node sends data, it flows through the topic to the destination node
Topic Naming
Topics are automatically named based on the port names:- Default: If you connect
temperature_outtotemperature_in, the topic is namedtemperature - Custom: You can rename topics in the properties panel
- Uniqueness: Topic names must be unique within a graph
Topic Types
Topics are strongly typed—they can only carry data of a specific schema type:Compatible Types
- Exact match: Output type exactly matches input type
- Compatible schemas: Types with the same structure (same fields, same types)
Incompatible Types
- Different schemas: Types with different structures
- Different field types: Same field names but different types (e.g.,
floatvsint)
Topic Lifecycle
Topics are created and managed automatically:- Creation - When you connect nodes, a topic is created
- Active - Topic is active while nodes are connected
- Data Flow - Data flows through the topic when source node publishes
- Cleanup - Topic is removed when connection is deleted
Topics are lightweight—they don’t consume resources until data is actually flowing through them. The framework manages topic lifecycle automatically.
Topic Transport
Topics can use different transport mechanisms depending on where nodes are running:Local Transport
When both nodes run on the same machine:- Uses shared memory (iceoryx2) for zero-copy communication
- Sub-microsecond latency for small messages
- No serialization overhead
Network Transport
When nodes run on different machines:- Uses Zenoh for network communication
- Async publishing doesn’t block local operations
- Latest-message semantics - only the most recent message is queued
The framework automatically selects the appropriate transport based on node locations. You don’t need to configure this manually.
Topic Properties
Each topic has configurable properties:- Name - The topic identifier
- Type - The schema type (read-only, determined by connection)
- Transport - Local or network (auto-selected)
- QoS Settings - Quality of service configuration (optional)
Quality of Service (QoS)
QoS settings control how messages are delivered:- Reliability - Best effort vs reliable delivery
- Durability - Volatile vs transient vs persistent
- History - Keep last N messages vs keep all
Multiple Subscribers
A single topic can have multiple subscribers:Each subscriber gets its own copy of the data. Modifying data in one subscriber doesn’t affect others.
Multiple Publishers
A single topic can have multiple publishers (with caution):Topic Best Practices
Descriptive Names
Use clear, descriptive topic names. “temperature_readings” is better than “data” or “topic1”.
One Purpose
Each topic should carry one type of data. Don’t reuse topics for different data types.
Schema First
Define schemas before creating topics. This ensures type safety from the start.
Avoid Deep Nesting
Keep topic hierarchies shallow. Deep nesting makes graphs hard to understand.