Subscribing

A subscriber registers a request for a publication by specifying the following elements.

When the publication node receives a message, it checks the subscription table to determine whether there are any subscription requests that either specify this particular node's subscription point, or match the content or topic, or both, of the message received.

For every match found, the node delivers the published message on the subscriber queue, using the optional CorrelId, if specified. If no CorrelId is specified, a fixed value is used. Each subscriber receives just one copy of each publication regardless of the number of matching subscriptions the client has.

SCADA applications use the SCADA port to publish and subscribe, and CorrelId is not applicable.

When the node has sent the publication to any subscribers that have a matching subscription, the publication is discarded, unless it is a retained publication.

Local subscriptions

Subscribers can specify a local option on registration. If they do so, they are requesting that their subscription registration is not forwarded to other brokers, but held by the local broker. Any message published at this broker that matches the subscription is received by this subscriber, but messages published to other brokers are not normally available, unless the subscriber has also registered a global subscription with an overlapping topic and the same subscription point.

Retained publications

If retained publications are used, the subscriber can specify the following options when it registers a subscription.

Related concepts
Topics
Publications
Subscriptions
Subscription points
Subscribers

Related tasks
Publishing
Using retained publications
De-registering a subscription

Related reference
Special characters in topics
Topic semantics and usage
Register Subscriber message