DDS specification says that default value of Reliability for DataWriter is RELIABLE and for DataReader is BEST_EFFORT. When DataWriter and DataReader are created with default QOS values, how can reliable communication performed? Does the ack/nack mechanism work, even though the DataReader is configured as BEST_EFFORT? Why default Reliability values are different for DataWriter and DataReader?
1 Answers
When DataWriter and DataReader are created with default QOS values, how can reliable communication performed? Does the ack/nack mechanism work, even though the DataReader is configured as BEST_EFFORT?
No, if you are applying default QoS settings to both DataWriter and DataReader, there will be no effort made to repair any lost packets and no ack/nack mechanisms kick in. Even though the DataWriter is able to provide reliable communications by default, it won't if the DataReader does not ask for it.
They only way to get reliable communication going would be to modify the DataReader QoS to use RELIABLE reliability.
Why default Reliability values are different for DataWriter and DataReader?
That is what the DDS Specification prescribes, but it does not explain the rationale behind that.
I suspect the thought may have been that this particular selection of reliability policies tends to cover the largest number of use cases with the least number of configuration changes. Best effort data flows are common in the types of systems that DDS is used for. With all policies set to default, there will be no QoS mismatches between DataWriters and DataReaders and best effort is indeed what is used. There is no (noticeable) overhead associated with that. If a DataReader does require guaranteed delivery, it just has to select the RELIABLE policy and the DataWriter will up its protocol with that DataReader to engage in the reliability protocol.
That said, for all QoSes that are Request-Offered (RxO), like reliability is, I consider it good practice to set them explicitly and to document why that particular combination of policies was selected for each dataflow.

- 16,669
- 7
- 46
- 69