Eclipse Zenoh Explained: Edge and Robotics Data
Robots, sensors, gateways, and cloud services often need to exchange data even when they have different network links, compute limits, or locations. Eclipse Zenoh is a data protocol designed for that range: it supports publish/subscribe, queries, and data storage across distributed systems. This explainer is for developers and engineers evaluating communications for edge computing, robotics, and IoT. It shows what Zenoh does, how its nodes fit together, where it differs from established messaging systems, and how to try a small Python example.
Why Eclipse Zenoh Is Being Discussed
Edge and robotics systems increasingly span embedded devices, local networks, remote sites, and cloud infrastructure. A single application may need fast sensor updates, a way to ask for current or stored values, and a route between endpoints that cannot connect directly. These needs can lead teams to combine several protocols and gateways.
Zenoh brings publish/subscribe, query, and storage abstractions into one protocol and supports different deployment topologies. The Eclipse Zenoh project describes its goal as unifying data in motion, data at rest, and computation. Its official overview introduces the protocol’s core concepts, while the Zenoh protocol specification defines wire behavior and semantics. Zenoh is a project-specific protocol, not an industry standard like DDS.
What Is Eclipse Zenoh?
Zenoh is a protocol and set of client libraries for reading, writing, publishing, and querying named data across a network. An application addresses data with a key expression, a path-like name such as factory/line-2/robot-7/pose. Publishers write values under keys; subscribers declare interest in matching keys; queryables can calculate or return responses to queries.
Applications interact through a Zenoh session. A session can communicate directly with peers, connect through a router, or participate in a larger routed network. This lets application code work with data keys while deployment configuration determines how nodes discover and reach one another. It does not make an unreliable network reliable or remove the need to design message formats, access control, and failure handling.
The Problem Zenoh Addresses
Distributed systems commonly split communication into separate layers. A lightweight device might publish telemetry through one protocol, an edge gateway might translate it, and a cloud service might query a database through another interface. Each conversion adds configuration and operational boundaries. Discovery, security, and reconnect behavior can also differ from one link to the next.
The challenge is especially visible at the edge. A central broker can be convenient, but a device may have intermittent access to it or limited resources for maintaining many connections. A direct peer network can reduce central dependencies but may be difficult to scale across routed sites. Meanwhile, simple pub/sub does not answer every data question: an operator may also need to ask for the current state or query a local store.
Zenoh’s design combines key-based pub/sub with query and queryable operations, and allows peer-to-peer or routed deployments. A router can connect regions or bridge nodes that do not discover each other directly. A storage plugin or application can provide data-at-rest behavior; installing a router by itself does not automatically make every publication persistent.
How Zenoh Works
A basic pub/sub flow has a publisher declare a key, a subscriber declare an interest, and Zenoh deliver matching samples to reachable subscribers. A key expression can represent one key or a pattern of keys, letting a consumer subscribe to a group such as a device’s telemetry without opening a separate subscription for every value.
For queries, a client requests data for a key expression. A queryable is an application or service that can answer that request. It can compute a response, return current state, or consult a storage component. A storage can combine subscription behavior with query responses, but persistence and retention are explicit system design choices.
Nodes are configured in one of several modes described in the deployment guide:
- Peer mode lets applications discover and connect to other peers on a local network. It is a convenient starting point for small experiments, though multicast discovery can be restricted by network policy.
- Client mode connects an application to a router, typically keeping one upstream session rather than forming direct connections to every peer.
- Router mode forwards data between connected nodes and can be used to connect network regions or form a routed topology.
An application does not need to choose a single topology for every device. Constrained clients can connect to a nearby router, peers can communicate locally, and routers can link larger sites. Network reachability, configuration, and policy still determine which connections can be established.
| Dimension | Eclipse Zenoh | DDS | MQTT |
|---|---|---|---|
| Main focus | Pub/sub, queries, and data access across devices, edge, and cloud | Data-centric pub/sub for real-time and embedded systems | Lightweight client/broker messaging |
| Data addressing | Hierarchical key expressions | Topics and keyed data objects | Topic names |
| Deployment shape | Peer, client-to-router, or routed nodes | Distributed participants with discovery and QoS | Clients connect to a broker |
| Query and storage | Queryables and optional storage components | Data-centric model with QoS; persistence depends on implementation and configuration | Broker features and retained/session data depend on the broker and use |
| Configuration emphasis | Key expressions, sessions, connectivity, and topology | QoS policies, discovery, and vendor implementation | Broker, topic, and client/session behavior |
| Common fit | Systems that span constrained devices, edge nodes, and routed networks | Real-time and robotics systems needing DDS semantics and QoS | IoT telemetry and integrations built around a broker |
These are different design choices, not a ranking. The Object Management Group’s DDS overview identifies DDS as an open international middleware standard with fine-grained quality-of-service controls. Zenoh may be evaluated alongside DDS in robotics and edge systems, but it does not become DDS merely because both can publish and subscribe. Existing teams should check interoperability and middleware support rather than assume that two protocols can exchange messages directly.
Components and Key Concepts
Keys and key expressions name data and subscription or query interests. Consistent naming is part of the application contract: teams should define units, schema versions, device identity, and update meaning rather than treating a path alone as a complete data model.
Sessions are the application-facing interaction with Zenoh. A session declares publishers, subscribers, queryables, and queries. Those declarations describe what the application wants to do; the configured mode and reachable network determine how it connects.
Routers and gateways forward traffic across links or regions. A router can be useful when direct peer connections are not suitable, when applications should connect to a stable endpoint, or when network boundaries need an explicit forwarding point. It also introduces another component to deploy, secure, monitor, and make available.
Queryables and storage handle request/response and stored data use cases. A queryable might return the latest robot status from memory; a configured storage can retain selected keys and respond to queries. Decide retention, durability, and recovery separately. A transient pub/sub sample is not automatically an archive.
Transports and security are deployment concerns, not a substitute for application authorization. Restrict which interfaces accept connections, protect cross-network links, and configure authentication and access control for the actual deployment. Do not expose a router’s listening endpoint to an untrusted network simply to make discovery easier.
Real-World Uses
In a robot fleet, each robot can publish status and sensor summaries under its own keys. Nearby subscribers can react locally, while a site-level router forwards selected data to a control system. An operator can query a queryable or configured store for a robot’s latest state without requiring every producer to call a central API directly.
For industrial IoT, devices can publish readings to edge software that filters or aggregates them before forwarding chosen values upstream. Local consumers may continue to coordinate while a remote connection is unavailable, provided the application has been designed for that operating condition. Zenoh provides communication primitives; it does not decide which measurements are safe to drop or how to reconcile state after a partition.
In a multi-site deployment, routers can connect edge regions to other network segments. Teams can keep high-volume or time-sensitive exchanges local and selectively expose data to wider systems. This can simplify a protocol path, but it does not eliminate the need for capacity planning, monitoring, data governance, or failover design.
Getting Started: Publish and Subscribe with Python
The official first-application guide provides current examples and links to language APIs. For a minimal local test, install the Python client in an isolated environment:
python -m venv .venv
Activate the environment for your shell, then install the client:
# macOS or Linux
source .venv/bin/activate
# Windows PowerShell
# .venv\Scripts\Activate.ps1
python -m pip install eclipse-zenoh
Save this subscriber as subscriber.py. It listens for ten seconds and prints matching samples:
import time
import zenoh
def on_sample(sample):
value = sample.payload.to_string()
print(f"{sample.key_expr}: {value}")
with zenoh.open(zenoh.Config()) as session:
subscriber = session.declare_subscriber(
"factory/line-2/robot-7/temperature",
on_sample,
)
print("Listening for temperature samples...")
time.sleep(10)
Save this publisher as publisher.py:
import time
import zenoh
with zenoh.open(zenoh.Config()) as session:
publisher = session.declare_publisher(
"factory/line-2/robot-7/temperature"
)
for value in (22.1, 22.2, 22.4):
publisher.put(str(value))
time.sleep(1)
Run python subscriber.py in one terminal and then python publisher.py in another on the same local network. The subscriber should print the three values. This uses the default peer configuration and local discovery, so multicast restrictions or host firewalls can prevent discovery. For a deployment with a router, install zenohd using the official installation instructions and configure clients to connect to its reachable endpoint. Use zenohd --help to verify that the router executable is available.
If the test does not work, check that both processes use the same key expression and Python environment, and inspect local firewall rules and network interfaces. If direct discovery is unavailable, use an explicitly configured router endpoint rather than opening arbitrary inbound access. To retain values for later queries, configure an appropriate storage plugin or implement a queryable; the example above sends transient samples only.
Common Misconceptions
“Zenoh is just another message broker.” A broker can be part of a deployment, but Zenoh also supports peer communication and routed topologies. Its query and storage abstractions extend beyond a basic broker-only pub/sub model.
“A router stores every message.” A router forwards traffic. Persistence requires a configured storage component or application that retains values, with explicit retention and recovery behavior.
“Using Zenoh guarantees low latency and delivery.” Actual latency and delivery depend on transport, topology, network conditions, QoS configuration, and application logic. Measure behavior under the failures and load the system is expected to handle.
Related Articles
- Edge computing networking and connectivity
- How autonomous mobile robots use sensors and software
- Event-driven architecture and asynchronous messaging
Changelog and Last Updated
- Initial publication; the examples use the Zenoh Python API and default local peer configuration.

