Force Network Mode
To force network transport (useful for remote subscribers):network_mode parameter controls transport selection:
None- Auto-detect: tries local first if available, falls back to networkSome(true)- Force network: always uses network transport (useful for remote subscribers)Some(false)- Force local: only uses local IPC (fails if no local publisher exists)
Shared Session Benefits
Single Session vs Multiple Sessions
Single Shared Session (via TopicManager):- One Zenoh session for all pub/sub pairs
- Lower memory footprint
- Faster startup time
- Centralized configuration
- Each publisher/subscriber creates its own session
- Higher memory usage (each session has overhead)
- Slower initialization (each session connects independently)
Performance Comparison
| Metric | Single Session | Multiple Sessions |
|---|---|---|
| Session Creation | ~100ms | ~300ms+ (for 3 topics) |
| Memory Usage | Lower per topic | Higher per topic |
| Message Latency | Similar | Similar |
The performance difference is most noticeable when you have many topics. For a single topic, the difference is minimal.