Topic base reliable service

2 posts / 0 new
Last post
Offline
Last seen: 5 years 6 months ago
Joined: 02/14/2014
Posts: 41
Topic base reliable service

By default we use best effort reliability all communications.  Is it possible to specify a topic as reliable?

Gerardo Pardo's picture
Offline
Last seen: 1 week 1 day ago
Joined: 06/02/2010
Posts: 602

Hi,

I think you could achieve this using XML to define the QoS, or at least the default QoS.

For example, if you have a file called USER_QOS_PROFILES.xml in the workign directory from which you run your application then this file will be read and yiu have the opportunity to configure the default QoS there. This is done with the attribute setting is_default_qos="true" in the profile you want to make the default (see snipped below).  You can then use the topic_filter attribute setting on specific QoS profiles to associate different QoS to different topic names. Note the topic_filter could be a regular expression, not just the name of a single topic. For example:

<qos_profile name="MyDefaultQos" is_default_qos="true">
  <datareader_qos topic_filter="MyReliableTopicName">;
    <reliability>
      <kind>RELIABLE_RELIABILITY_QOS</kind>
    </reliability>;
  </datareader_qos>
  <datareader_qos topic_filter="MyBestEffortsTopicName">
    <reliability>
      <kind>BEST_EFFORT_RELIABILITY_QOS</kind>
    </reliability>
  </datareader_qos>
</qos_profile>

 You can get more information on the use of QoS profiles in section 17.9 of the Connext DDS User's Manual 5.1.

Gerardo