Subscriptions

A subscription is a record that contains the information that a subscriber passes to its local broker to describe the publications that it wants to receive.

A subscription consists of the following information:

Subscribers issue subscription registration requests to their local broker when they want to receive published messages. All the information associated with the subscription is recorded by the broker in the subscription table.

When the broker receives a publication, it scans the subscription table to determine whether there is a subscription request that matches the topics, subscription point, and filter, of the publication. For each subscription request that matches, the broker forwards the publication to the subscriber queue specified, unless the subscriber has registered with the PubOnReqOnly option.

A subscription is removed from the subscription table only when one of the following events occurs:

If the subscriber specifies a temporary dynamic queue as the queue to which publications should be sent, the broker automatically de-registers the subscription when the queue is deleted.

Related concepts
Topics
Publishers
Publications
Subscribers
Publish/subscribe topologies

Related tasks
Subscribing

Related reference
Publication node
Filter node
MQRFH2 structure
Publish message