Skip to content

Intraprocess Delivery

ds58 edited this page Jul 16, 2025 · 14 revisions

From the Fast-DDS documentation (3.2.2):

eProsima Fast DDS allows to speed up communications between entities within the same process by avoiding any of the overhead involved in the transport layer. Instead, the Publisher directly calls the reception functions of the Subscriber. This not only avoids the copy or send operations of the transport, but also ensures the message is received by the Subscriber, avoiding the acknowledgement mechanism.

Benefits

  • Low latency
  • Low overhead
  • Large data (think color or depth images) is immediately handed to the subscriptions without extra memory copies
  • Allows for GitHub CI to work reliably on all platforms (Linux, Windows, macOS)

Caveats

  • The publish() method will block for as long as the subscription takes to process the data!
    • Very bad for high frequency loops (e.g. robot control, UI rendering, etc.)
  • Cannot selectively enable / disable Intraprocess Delivery per-node*

Intraprocess Delivery is disabled by default. We expect users to often use publishers in high frequency loops. Intraprocess Delivery is disabled by default to give the most reasonable default behavior when it comes to the publish() method. That is, for it never to block unexpectedly.

Enable / Disable

  • Java system property: Set fastdds.intraprocess.delivery to true
  • Environment variable: Set FASTDDS_INRAPROCESS_DELIVERY to true
  • jros2.properties file: see here

The settings take effect in that order, with Java system property being highest priority.

*Intraprocess Delivery can only be enabled per runtime instance of Fast-DDS / jros2, NOT per-node. That is, if enabled, all new ROS2Node instances will use Intraprocess Delivery.

Clone this wiki locally