how to manage life cycle of topic instances manually while using qos configuration file

208 Views Asked by At

I use DDS Opensplice community version 6.7. At the moment when I create a topic, I use QoS xml configuration file. The QoS config file sets settings such as liveliness and resource_limits for a topic.

I know that if you don't use QoS config file, which default QoS will be used, you can use "dds::core::policy::WriterDataLifecycle::ManuallyDisposeUnregisteredInstances()" to manually register/unregister/dispose topic instance.

I want to know while I using the QoS config file, how can I do the same to manually register/unregister/dispose topic instance?

Is there any entry in QoS config file that corresponds to ManuallyDisposeUnregisteredInstances?

1

There are 1 best solutions below

3
On

If you use

dds::core::policy::WriterDataLifecycle::ManuallyDisposeUnregisteredInstances 

Documentation states:

Returns a WriterDataLifecycle QoS instance with autodispose_unregistered_instances set to false

You can update the XML QoS as follow:

<datawriter_qos>
  <writer_data_lifecycle>
      <autodispose_unregistered_instances>
           false
      </autodispose_unregistered_instances>
  </writer_data_lifecycle>
</datawriter_qos>

However, this is not for a topic but for a DataWriter.