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