86.7 Configuring Participants
An XML <persistence_service> tag will contain a set of <participants>. The Persistence Service will persist topics published in the domainIDs associated with these participants. For example:
<persistence_service name="Srv1">
<participant name="Part1">
<domain_id>71</domain_id>
...
</participant>
<participant name="Part2">
<domain_id>72</domain_id>
...
</participant>
</persistence_service>
Using the above example, the Persistence Service will create two DomainParticipants, one on DDS domain 71 and one on DDS domain 72. Each DomainParticipant is used to receive and publish data in its domain.
After the DomainParticipants are created, the Persistence Service will monitor the discovery traffic, looking for topics to persist.
Notice that in some cases there may be more than one DomainParticipant per domain when there are multiple versions of a type for a given topic. (See 86.13 Support for Extensible Types.)
The <domain_id> tag can be specified alternatively as an attribute of <participant>. For example:
<persistence_service name="Srv1">
<participant name="Part1" domain_id="71">
...
</participant>
</persistence_service>
Important: If you run Persistence Service in PERSISTENT mode, you must assign a name to each <participant> tag, using the name attribute value. This is because, to correctly restore data from a previous execution of Persistence Service for a participant (see Table 86.3 Persistent Storage tags), you must set the name attribute value for the <participant> tag to the same string. This enables Persistence Service to correctly fetch the data from the stored state.
Table 86.5 Participant Tags describes the participant tags. Notice that <persistence_group> is required.
|
Tags within <participant> |
Description |
Number of Tags Allowed |
|
<domain_id> |
Domain ID associated with the DomainParticipant. The domain ID can be specified as an attribute of the participant tag. Default: 0 |
0 or 1 |
|
<durable_subscriptions> |
Configures a set of Durable Subscriptions for a given topic. This is a sequence of <element> tags, each of which has a <name> (role name in DDS_EndpointGroup_t), a <topic_name>, and a <quorum_count> (quorum in DDS_EndpointGroup_t). For example: <durable_subscriptions>
<element>
<name>DurSub1</name>
<topic_name>Example MyType</topic_name>
<quorum_count>2</quorum_count>
</element>
<element>
<name>DurSub2</name>
<topic_name>Example MyType</topic_name>
</element>
</durable_subscriptions>
Default: Empty list See 86.9 Configuring Durable Subscriptions in Persistence Service for additional information |
0 or 1 |
|
<domain_participant_qos> |
Participant QoS. Default: DDS defaults |
0 or 1 |
|
<persistence_group> |
A persistence group describes a set of topics whose data must be persisted by the Persistence Service. |
1 or more |