On this page

qualityOfService QML Value Type

ROS 2 Quality of Service settings for a publisher or subscriber. More...

Import Statement: import QtRos2.Core
Status: Experimental Extension

Properties

Detailed Description

Holds the QoS policies (reliability, durability, history, liveliness and the queueSize / depth) applied to an Entity's qos property. Policy values are the enums on QualityOfService, e.g.

SomeSubscriber {
    qos.reliability: QualityOfService.ReliabilityBestEffort
    qos.durability: QualityOfService.DurabilityTransientLocal
    qos.queueSize: 5
}

For common cases prefer a ready-made profile from QualityOfService: qos: QualityOfService.sensorData().

Note: This is unrelated to qoSProfile from QtRos2.RosgraphMsgs, which is the rosgraph_msgs/QoSProfile introspection message.

See also QualityOfService.

Property Documentation

durability : enumeration

Whether the middleware keeps samples for subscribers that join late.

ConstantDescription
QualityOfService.DurabilitySystemDefaultLeave the policy to the RMW implementation. This is the default.
QualityOfService.DurabilityVolatileDeliver only to subscribers that are already connected.
QualityOfService.DurabilityTransientLocalKeep the last queueSize samples so a late subscriber still receives them: how latched topics such as /tf_static work.
QualityOfService.DurabilityBestAvailableRequest the strongest policy that still matches every endpoint discovered so far.

history : enumeration

How many samples the middleware buffers.

ConstantDescription
QualityOfService.HistorySystemDefaultLeave the policy to the RMW implementation. This is the default.
QualityOfService.HistoryKeepLastBuffer at most queueSize samples, discarding the oldest.
QualityOfService.HistoryKeepAllBuffer every sample, up to the middleware's resource limits. queueSize is ignored.

liveliness : enumeration

How an endpoint reports that it is still alive. A publisher and a subscriber match only if the publisher's policy is at least as strict as the subscriber's, ordered Automatic, then ManualByTopic.

ConstantDescription
QualityOfService.LivelinessSystemDefaultLeave the policy to the RMW implementation. This is the default.
QualityOfService.LivelinessAutomaticThe middleware asserts liveliness on the application's behalf for as long as the process is running.
QualityOfService.LivelinessManualByTopicThe publisher asserts its own liveliness per topic. Note that this module exposes no lease duration and no way to assert liveliness, so in practice this only affects which endpoints match.
QualityOfService.LivelinessBestAvailableRequest the strongest policy that still matches every endpoint discovered so far.

Note: ROS 2 also had a MANUAL_BY_NODE policy. It is deliberately not exposed here: rmw deprecated it in Jazzy and removed it in Kilted. Use LivelinessManualByTopic, which matches anything MANUAL_BY_NODE would have matched.

queueSize : int

The depth of the message queue, used when history is QualityOfService.HistoryKeepLast. The default is 10.

reliability : enumeration

How hard the middleware works to deliver every sample.

ConstantDescription
QualityOfService.ReliabilitySystemDefaultLeave the policy to the RMW implementation. This is the default.
QualityOfService.ReliabilityReliableRetransmit until every sample has been acknowledged.
QualityOfService.ReliabilityBestEffortSend once and drop samples under load: the right choice for high-rate sensor streams where the newest sample matters most.
QualityOfService.ReliabilityBestAvailableRequest the strongest policy that still matches every endpoint discovered so far.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.