Disposing of Topic Instances

3 posts / 0 new
Last post
Frank J. Crow's picture
Offline
Last seen: 12 years 11 months ago
Joined: 04/08/2011
Posts: 12
Disposing of Topic Instances

Is it possible to have an application that disposes of topic instances that it did not create?

 

Further, is it possible for an application to start up and dispose of topic instances that it has never seen?  (by key)

 

 

Organization:
Keywords:
Frank J. Crow's picture
Offline
Last seen: 12 years 11 months ago
Joined: 04/08/2011
Posts: 12

After a bit of experimentation, I'm able to answer my own questions.

 

While it is possible to have an application that disposes of topic instances that it did not create, it is not possible to dispose of instances that have not been seen.

 

Just FYI... in case somebody else needs to know about topic instance disposal.

 

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 2 days ago
Joined: 06/02/2010
Posts: 602

 

Hi,

 

What you describe is the default out-of-the-box behavior. However it is possible to both dispose a Topic instance from a writer that has never written that Topic-instance before as well as to receive the dispose Topic-instance message from a DataReader that has never seen that Topic-instance if you configure the QoS of both the DataWriter and DataReader to enable this behavior.

 

On the DataWriter you need to configure the DataWriterProtocolQosPolicy setting the 'serialize_key_with_dispose' attribute in this policy to DDS_BOOLEAN_TRUE.  

Similarly on the DataReader you need to configure the DataReaderProtocolQosPolicy setting the 'propagate_dispose_of_unregistered_instances' attribute in this policy to DDS_BOOLEAN_TRUE.

 

You can find details on what these policies/setting do at: http://community.rti.com/docs/html/api_cpp/structDDS__DataWriterProtocolQosPolicy.html and http://community.rti.com/docs/html/api_cpp/structDDS__DataReaderProtocolQosPolicy.html