temporary disable a reader from receiving data

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

Hi,

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.)

Offline
Last seen: 1 month 1 week ago
Joined: 09/23/2018
Posts: 62

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

6.4.2 ENTITYFACTORY QosPolicy 

4.1.2.1 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.  

 

Offline
Last seen: 3 years 5 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).