Frequent creation and deletion of content filtered topics and readers

5 posts / 0 new
Last post
Offline
Last seen: 6 years 2 months ago
Joined: 07/12/2012
Posts: 51
Frequent creation and deletion of content filtered topics and readers

What is the best practise if a content filter is used to select individual instances of a topic
to read. Also, this content filter may be required to change frequently - a use case for this might
be a HMI application that reads from DDS which switch to different instances. The content filtered
topic and reader will also be transient in this case.
Is it a heavy weight operation to create and delete content filtered topics and associated readers
on a frequent basis ? Or is there a other, better practise to approach this ?

Thanks
Nico.

Organization:
Offline
Last seen: 3 years 1 month ago
Joined: 01/15/2013
Posts: 94

Hi Nico,

The Content Filter expression parameters can be changed dynamically while the DataReader is operating.

It's much lighter to change the expression parameters of a ContentFilteredTopic than creating and deleting the Topics and DataReaders dynamically.

Recall, however, that the Content Filter expression itself cannot be modified dynamically once it has been created.

Hope this helps.

Thanks,

Juanlu

Offline
Last seen: 6 years 2 months ago
Joined: 07/12/2012
Posts: 51

Hi Juanlu,

Ok, thanks. 

Nico

rip
rip's picture
Offline
Last seen: 1 day 17 hours ago
Joined: 04/06/2012
Posts: 324

Depending on which version of Connext you are using, 5.1.0 removes the restriction on the expression.  

See What's New for 5.1.0, Chapter 8:

 

8.1 Ability to Change Expression in ContentFilteredTopic

In previous releases, the filter expression in a ContentFilteredTopic was immutable and you could only change the expression parameters. This limitation has been removed. Now you can change the filter expression by means of the DDS_ContentFilteredTopic’s set_expression() operation.

 

Offline
Last seen: 6 years 2 months ago
Joined: 07/12/2012
Posts: 51

Thanks for pointing out the new feature. It may turn out to be very useful.

Nico.