Configuring Durable Subscriptions in Persistence Service

This section assumes you are familiar with the concept of Required Subscriptions.

A Durable Subscription is a Required Subscription where DDS samples are stored and forwarded by Persistence Service.

There are two ways to create a Durable Subscriptions:

  1. Programmatically using a DomainParticipant API:
  2. A subscribing application can register a Durable Subscription by providing the topic name and the endpoint group information, consisting of the Durable Subscription role_name and the quorum. To register or delete a Durable Subscription, use the DomainParticipant’s register_durable_subscription() and delete_durable_subscription() operations, respectively (see DomainParticipant Operations). The Durable Subscription information is propagated via a built-in topic to Persistence Service.

  3. Preconfigure Persistence Service with a set of Durable Subscriptions:
  4. Persistence Service can be (pre-)configured with a list of Durable Subscriptions using the <durable_subscriptions> XML tag under <participant>.

    <participant name="Participant">
        ...
        <durable_subscriptions>
            <element>
                <role_name>Logger</role_name>
                <topic_name>Track</topic_name>
                <quorum>2</quorum>
            </element>
            <element>
                <role_name>Processor</role_name>
                <topic_name>Track</topic_name>
                <quorum>1</quorum>
            </element>
        </durable_subscriptions>
    </participant>
    

After registering or configuring the persistence service with specific Durable Subscriptions, the persistence service will keep DDS samples until they are acknowledged by all the required Durable Subscriptions. In the above example, the DDS samples must be acknowledged by two DataReaders that belong to the “Logger” Durable Subscription and one DataReader belonging to the “Processor” Durable Subscription.

© 2018 RTI