You are here: Part 6: RTI Persistence Service > Configuring Persistence Service > Support for Extensible Types

Support for Extensible Types

Persistence Service includes partial support for the "Extensible and Dynamic Topic Types for DDS" specification from the Object Management Group (OMG)1http://www.omg.org/spec/DDS-XTypes/ . This section assumes that you are familiar with Extensible Types and you have read the RTI Connext DDS Core Libraries Getting Started Guide Addendum for Extensible Types.

Persistence groups can publish and subscribe to topics associated with final and extensible types.

The service will automatically create different pairs (PRSTDataReader, PRSTDataWriter) for each version of a type discovered for a topic in a persistence group. In Connext DDS 5.0, it is not possible to associate more than one type with a topic within a single DomainParticipant, therefore each version of a type requires its own DomainParticipant.

The TYPE_CONSISTENCY_ENFORCEMENT QosPolicy kind for each PRSTDataReader is set to DISALLOW_TYPE_COERCION. This value cannot be overwritten by the user.

For example:

struct A {
    long x;
};
struct B {
    long x;
    long y;
};

Let’s assume that Persistence Service is configured as follows and we have two DataWriters on Topic “T” publishing type “A” and type “B” and sending TypeObject information.

<persistence_service name="XTypes">
    <participant name="XTypesParticipant">
        <persistence_group name="XTypesPersistenceGroup">
            <filter>T</filter>
        </persistence_group>
    </participant>
</persistence_service>

When Persistence Service discovers the first DataWriter with type “A”, it will create a DataReader (PRSTDataReader) to read DDS samples from that DataWriter, and a DataWriter (PRSTDataWriter) to publish and store the received DDS samples so they can be available to late-joiners.

When Persistence Service discovers the second DataWriter with type “B”, it will see that type “B” is not equal to type “A”; then it will create a new pair (PRSTDataReader, PRSTDataWriter) to receive and store DDS samples from the second DataWriter.

Since the PRSTDataReaders are created with the TypeConsistencyEnforcementQosPolicy’s kind set to DISALLOW_TYPE_COERCION, the PRSTDataReader with type “A” will not match the DataWriter with type “B”. Likewise, the PRSTDataReader with type “B” will not match the DataWriter with type “A”.

© 2016 RTI