RELIABILITY
-
The RELIABILITY policy applies to the topic, data reader, and data writer entities via the
reliability
member of their respective QoS structures. Below is the IDL related to the reliability QoS policy:
enum ReliabilityQosPolicyKind {
BEST_EFFORT_RELIABILITY_QOS,
RELIABLE_RELIABILITY_QOS
};
struct ReliabilityQosPolicy {
ReliabilityQosPolicyKind kind;
Duration_t max_blocking_time;
};
-
This policy controls how data readers and writers treat the data samples they process. The “best effort” value (
BEST_EFFORT_RELIABILITY_QOS
) makes no promises as to the reliability of the samples and could be expected to drop samples under some circumstances. The “reliable” value (
RELIABLE_RELIABILITY_QOS
) indicates that the service should eventually deliver all values to eligible data readers.
-
The
max_blocking_time
member of this policy is used when the history QoS policy is set to “keep all” and the writer is unable to return because of resource limits (due to transport backpressure—see RESOURCE_LIMITS for details). When this situation occurs and the writer blocks for more than the specified time, then the write fails with a timeout return code. The default for this policy for data readers and topics is “best effort,” while the default value for data writers is “reliable.”
-
This policy is considered during the creation of associations between data writers and data readers. The value of both sides of the association must be compatible in order for an association to be created. The reliability kind of data writer must be greater than or equal to the value of data reader.