Real-Time Publish Submarine is a protocol designed to deliver live, low-latency data streams over IP networks. It enables publishers and subscribers to exchange time-sensitive information with minimal delay.
The system is widely adopted in finance, industrial automation, and media, where timing accuracy and reliability are critical. Below is a structured overview of its key characteristics and roles.
| Aspect | Description | Key Benefit | Typical Use Case |
|---|---|---|---|
| Protocol Type | IP-based multicast and unicast transport | Efficient one-to-many distribution | Market data distribution |
| Delivery Model | Publisher-driven, event-based messaging | Low latency and ordered delivery | Live trading feeds |
| Transport Support | UDP with optional reliability and ordering | Flexible trade-off between speed and robustness | Industrial sensor networks |
| Discovery | >Automated endpoint and topic discovery | Simplified integration and scaling | Dynamic ad hoc networks |
How RTPS Handles Data Publication
Publisher Responsibilities
In RTPS, a publisher creates and sends data samples for specific topics, attaching metadata such as sequence numbers and timestamps. It controls rate and payload size to match network conditions.
Subscriber Responsibilities
Subscribers declare interest in topics and maintain bidirectional communication with publishers. They handle sample reception, retransmission requests, and data reconstruction to present a coherent stream.
RTPS Reliability and Ordering Mechanisms
Best-Effort Delivery Mode
Best-effort transmission omits retransmission, prioritizing speed and is suitable for loss-tolerant applications such as live video or radar visualization where occasional loss is acceptable.
Reliable Delivery Mode
Reliable delivery uses acknowledgments, retransmissions, and history caches to ensure sample durability. This mode supports ordered or unordered consumption based on subscriber configuration.
Network Transport and Flow Control
Underlying Transport Protocols
RTPS typically runs over UDP for low-latency delivery, with optional enhancements for congestion control. In controlled environments, it may map to TCP or other reliable transports.
Flow and Congestion Management
Backpressure, resource limits, and optional protocol-level signals help prevent overload. These controls protect both endpoints and shared network infrastructure under heavy load.
Security and Administrative Features
Authentication and Access Control
Security extensions include participant authentication, message integrity, and optional encryption. Policies define which endpoints may publish or subscribe to specific topics.
Domain Partitioning and Discovery Security
Multiple RTPS domains isolate traffic, reducing interference and exposure. Secure discovery protocols and signed participant metadata further limit unauthorized interaction.
Operational Best Practices and Takeaways
- Match delivery mode and history settings to application tolerance for loss and latency.
- Design topic namespaces and participant domains to limit unnecessary traffic and simplify debugging.
- Monitor network load, retransmission rates, and subscriber lag to detect misconfiguration early.
- Use security extensions in multi-tenant or untrusted environments to enforce access policies.
- Validate timing and determinism under peak load to ensure real-time requirements are met.
FAQ
Reader questions
How does RTPS achieve low latency compared to higher-level middleware?
RTPS minimizes processing overhead by using simple packet formats, UDP-based transmission, and event-driven delivery, avoiding queues and batching layers that add delay.
Can RTPS guarantee message delivery in lossy networks?
Reliable mode with retransmissions and history management can recover lost samples, but extreme loss or bandwidth constraints may still affect timeliness and completeness.
What happens when a subscriber joins late and misses data?
Depending on configuration and history depth, the subscriber may request missed samples via relay or catch-up mechanisms, or it may start receiving only new data.
Is RTPS suitable for non-financial applications such as robotics or IoT?
Yes, RTPS is used in robotics, industrial control, and IoT for its deterministic timing, multi-participant scalability, and support for both real-time and best-effort traffic patterns.