A client can use the SubscriptionControl feature to subscribe other client sessions to topics that
they have not requested subscription to themselves and also to unsubscribe clients from
topics. It also enables the client to register as the handler for routing topic
Subscribing and unsubscribing clients
modify_session, select_topic permission for the topics being
A client can subscribe client sessions that it knows about to topics that those
clients have not explicitly requested. It can also unsubscribe clients from topics.
A session identifier is required to specify the client session that is to be
subscribed or unsubscribed. Use the ClientControl feature to get the identifiers for connected client
The SubscriptionControl feature uses topic
selectors to specify topics for subscription and unsubscription. Many topics can be
specified in a single operation.
The client being subscribed to topics must have read_topic permission for the topics it is being subscribed
Using session properties to select clients to subscribe and
view_session, modify_session, select_topic permission for the topics being
When managing client subscriptions, a client can specify a filter for which client
sessions it subscribes to topics or unsubscribes from topics. The filter is a query
expression on the values of session properties.
The managing client defines a filter and sends a subscription request with this
filter to the Diffusion™ server. The Diffusion
server evaluates the query and subscribes those currently connected client sessions
whose session properties match the filter to the topic or topics.
The filter is evaluated only once. Clients that subsequently connect or clients whose
properties change are do not cause the subscription request to be reevaluated. Even
if these clients match the filter, they are not subscribed.
Managing all subscriptions from a separate control
You can prevent client sessions from subscribing themselves to topics and control all
subscriptions from a separate control client session that uses SubscriptionControl feature to subscribe clients to
To restrict subscription capability to control sessions, configure the following
Acting as a routing subscription handler
view_session, modify_session, register_handler
Routing topics can be created with a server-side handler that
assigns clients to real topics. However, you can omit the server-side handler such
that subscriptions to routing topics are directed at a client acting as a routing
A client can register a routing subscription handler for a branch of the topic tree.
Any subscription requests to routing topics in that branch that do not have server-side handlers are passed to
the client for action.
On receipt of a routing subscription request the client can respond with a route
request that specifies the path of the actual topic that the routing topic maps to
for the requesting client. This subscription fails if the target topic does not
already exist or if the requesting client does not have read_topic permission for the routing topic
or target topic.
The client can complete other actions before calling back to route. For example, it
could use the TopicControl feature to
create the topic that the client is to map to.
Alternatively, the client can defer the routing subscription request in which case
the requesting client remains unsubscribed. This is similar to denying it from an
authorization point of view.
The client must reply with a route or defer for all routing requests.