Quality of Service (QoS)

Quality of Service (QoS) policies control the behavior of DDS entities.

For a complete guide on using QoS policies, see the QoS Usage Guide.

Key QoS Policies

  • Reliability: BEST_EFFORT vs RELIABLE
  • Durability: VOLATILE, TRANSIENT_LOCAL, TRANSIENT, PERSISTENT
  • History: KEEP_LAST vs KEEP_ALL
  • Deadline: Maximum time between samples
  • Liveliness: Detecting inactive writers
  • Ownership: SHARED vs EXCLUSIVE

Example

auto qos = astutedds::dcps::DataWriterQosBuilder()
    .reliability(astutedds::dcps::ReliabilityQosPolicyKind::RELIABLE_RELIABILITY_QOS)
    .durability(astutedds::dcps::DurabilityQosPolicyKind::TRANSIENT_LOCAL_DURABILITY_QOS)
    .history(astutedds::dcps::HistoryQosPolicyKind::KEEP_LAST_HISTORY_QOS, 10)
    .build();