Subscriber dropping messages

2 posts / 0 new
Last post
Offline
Last seen: 5 years 4 months ago
Joined: 11/13/2014
Posts: 11
Subscriber dropping messages

Hi,

I am using DynamicData types and have recently run into the issue of messages being dropped in my subscriber.  I have changed my datawriter and datareader to use STRICT RELIABLE for my QoS profile.  Below is my code for both the datawriter and datareader, please let me know if there is something I am missing.

DDSDataReader *data_reader = participant->create_datareader_with_profile(topic, DDS_BUILTIN_QOS_LIB_EXP, DDS_PROFILE_GENERIC_STRICT_RELIABLE, serialized_listener, DDS_STATUS_MASK_NULL)

and

DDSDataWriter *data_writer = participant->create_datawriter_with_profile(topic, DDS_BUILTIN_QOS_LIB_EXP, DDS_PROFILE_GENERIC_STRICT_RELIABLE, NULL, DDS_STATUS_MASK_NULL)

 Does the DDS_PROFILE_GENERIC_STRICT_RELIABLE QoS profile cover the case of setting both the QoS Reliability = Reliable_reliability and the History = Keep_All.  If it doesn't set those values are there any of the builtin QoS profiles that do?  Any help is much appreciated.
 
Thanks,
Steve
Organization:
Offline
Last seen: 3 months 3 weeks ago
Joined: 09/10/2010
Posts: 32

Hello,

     You can find out what all the different settings are for the builtin profiles by going to the resources directory and looking up the correct profile in the xml files that are there.  Here are the settings for Strict Reliable builtin profile:

(As you can see, both of those parameters are being set).

<qos_profile name="Generic.StrictReliable" base_name="BuiltinQosLib::Generic.Common">
  <datawriter_qos>
    <reliability>
      <kind>RELIABLE_RELIABILITY_QOS</kind>
      <max_blocking_time>
        <sec>5</sec>
        <nanosec>0</nanosec>
      </max_blocking_time>
    </reliability>
    <history>
      <kind>KEEP_ALL_HISTORY_QOS</kind>
    </history>
    <protocol>
      <rtps_reliable_writer>
        <!-- All write() calls will block (for at most 
                 max_blocking_time) if there are 40 unacknowledged
                 samples in the writer queue -->
        <max_send_window_size>40</max_send_window_size>
        <min_send_window_size>40</min_send_window_size>
        <heartbeats_per_max_samples>10</heartbeats_per_max_samples>
        <!-- See low_watermark -->
        <heartbeat_period>
          <sec>0</sec>
          <nanosec>200000000</nanosec>
        </heartbeat_period>
        <!-- See high_watermark -->
        <fast_heartbeat_period>
          <sec>0</sec>
          <nanosec>20000000</nanosec>
        </fast_heartbeat_period>
        <late_joiner_heartbeat_period>
          <sec>0</sec>
          <nanosec>20000000</nanosec>
        </late_joiner_heartbeat_period>
        <max_nack_response_delay>
          <sec>0</sec>
          <nanosec>0</nanosec>
        </max_nack_response_delay>
        <!-- When the number of unacknowledged samples reaches
                 the high_watermark, the fast_heartbeat_period is
                 used -->
        <high_watermark>25</high_watermark>
        <!-- When the number of unacknowledged samples dips
                 below the low_watermark, the heartbeat_period is
                 used -->
        <low_watermark>10</low_watermark>
        <!-- The maximum number of heartbeat retries before a
                 remote DataReader is marked as inactive -->
        <max_heartbeat_retries>500</max_heartbeat_retries>
      </rtps_reliable_writer>
    </protocol>
  </datawriter_qos>
  <datareader_qos>
    <resource_limits>
      <max_samples>80</max_samples>
    </resource_limits>
    <reliability>
      <kind>RELIABLE_RELIABILITY_QOS</kind>
    </reliability>
    <protocol>
      <rtps_reliable_reader>
        <min_heartbeat_response_delay>
          <sec>0</sec>
          <nanosec>0</nanosec>
        </min_heartbeat_response_delay>
        <max_heartbeat_response_delay>
          <sec>0</sec>
          <nanosec>0</nanosec>
        </max_heartbeat_response_delay>
      </rtps_reliable_reader>
    </protocol>
    <history>
      <kind>KEEP_ALL_HISTORY_QOS</kind>
    </history>
  </datareader_qos>
</qos_profile>