How To Configure a DataReader for Durable Reader State

To configure a DataReader with durable reader state, use the PROPERTY QosPolicy (DDS Extension) associated with DataReaders and DomainParticipants.

A property defined in the DomainParticipant will be applicable to all the DataReaders contained in the participant unless it is overwritten by the DataReaders. Durable Reader State Properties lists the supported properties.

Durable Reader State Properties

Property

Description

dds.data_reader.state.odbc.dsn

Required.

The ODBC DSN (Data Source Name) associated with the database where the DataReader state must be persisted.

dds.data_reader.state.
filter_redundant_samples

To enable durable reader state, this property must be set to 1.

When set to 0, the reader state is not maintained and Connext DDS does not filter duplicate samples that may be coming from the same virtual writer.

Default: 1

dds.data_reader.state.odbc.driver

This property indicates which ODBC driver to load. If the property is not specified, Connext DDS will try to use the standard ODBC driver manager library (UnixOdbc on UNIX/Linux systems, the Windows ODBC driver manager on Windows systems).

dds.data_reader.state.odbc.username

These two properties configure the username and password used to connect to the database.

Default: No password or username

dds.data_reader.state.odbc.password

dds.data_
reader.state.restore

This property indicates if the persisted DataReader state must be restored or not once the DataReader is restarted.

If this property is 0, the previous state will be deleted from the database. If it is 1, the DataReader will restore its previous state from the database content.

Default: 1

dds.data_reader.state.
checkpoint_frequency

This property controls how often the reader state is stored into the database. A value of N means store the state once every N samples.

A high frequency will provide better performance. However, if the reader is restarted it may receive some duplicate samples. These samples will be filtered by Connext DDS and they will not be propagated to the application.

Default: 1

dds.data_reader.state.persistence_
service.request_depth

This property indicates how many of the most recent historical samples the persisted DataReader wants to receive upon start-up.

Default: 0

© 2018 RTI