Types of matching

A ‘match’ between the local and remote entities occurs only if the DataReader and DataWriter have the same Topic, compatible QoS policies, and a compatible data type.

By default, type matching is done using the TypeObject. The DataReader’s type must be assignable from the DataWriter’s type. If you want to be more restrictive, you can configure the TypeConsistencyEnforcementQosPolicy to DISALLOW_TYPE_COERCION. This way, type equality is enforced. If the DataReader does not allow type coercion, then its type must be structurally identical to the type of the DataWriter.

If the TypeObject is not available, the second option is to use the type name. In this case, the DataReader’s and DataWriter’s registered type names must match exactly.

The TypeObject may not be available for different reasons. For example, when the TypeObject is bigger than participant.resource_limits.type_object_max_serialized_length and it cannot be serialized. Also, setting this QoS to 0 makes the application not send any TypeObject.

Furthermore, if the DomainParticipant has been set up to ignore certain DataWriters/DataReaders, those entities will not be considered during the matching process.

To detect matching problems and debug why two types are incompatible, you can enable logging at the WARNING level or use RTI Admin Console's Match Analysis feature.