temporary disable a reader from receiving data

3 posts / 0 new
Last post
Last seen: 3 years 4 weeks ago
Joined: 04/02/2020
Posts: 4
temporary disable a reader from receiving data


I need to disable a reader from recieving data at runtime, and later enable it again.

Is There a built in way to do so?

If so, what are the consequences? (casual discovery etc.)

Last seen: 3 weeks 7 hours ago
Joined: 09/23/2018
Posts: 57

From what I understand, you cannot disable a datareader once it is enabled.  

6.4.2 ENTITYFACTORY QosPolicy Rules for Calling enable()

"There is no complementary “disable” operation. You cannot disable an entity after it is enabled."

There are probably a number of ways of functionally disabling a datareader,  one way would be to delete it and create a new one when it's needed again.  


Last seen: 2 years 7 months ago
Joined: 08/20/2012
Posts: 25

Another option is to change Partition QoS such that the Publisher and Subscriber entities no longer match, then revert later. The consequence will be that the endpoint will need to be updated each time (i.e. a Discovery sample—NOT full rediscovery—will be sent by the entity whose Partition QoS has changed).