SecureTopic Method (ISharedPubSubConnection)
- Last UpdatedApr 08, 2026
- 1 minute read
Restricts publishing on this topic and its children
to the specified security group.
void SecureTopic(
string topic,
string securityGroup
)
void SecureTopic(
String^ topic,
String^ securityGroup
)
Parameters
- topic
- The topic string to restrict.
- securityGroup
- The security group string.
This call is useful when security is needed around publishing to a specific topic tree. With this call, publishers can be restricted to only those that belong to the named Windows security group. Applications running as users that are not members of this group will have their publications rejected when they publish on the secured topic.
For this call to be successful, you must be a member of the same security group as the application you are running.
PubSubConnection PS = new PubSubConnection();
PS.SecureTopic("mySystem.MyTopic", "MyGroup");
PubSubConnection PS = new PubSubConnection();
PS.SecureTopic("mySystem.MyTopic", "MyGroup");