Home

 

Retained publications

 

+

Search Tips   |   Advanced Search

 

By default, a broker deletes a publication when it has sent that publication to all the interested subscribers. This type of processing is suitable for event information, but is not always suitable for state information.

A publisher can specify that it wants the broker to keep a copy of a publication, which is then called a retained publication. The copy can be sent to subsequent subscribers who register an interest in the topic. This means that new subscribers don't have to wait for information to be published again before they receive it. For example, a subscriber registering a subscription to a stock price would receive the current price straightaway, without waiting for the stock price to change (and hence be re-published).

The broker retains only one publication for each topic, so the old publication is deleted when a new one arrives. It is recommended that you do not have more than one publisher sending retained publications on the same topic.

Subscribers can specify that they do not want to receive retained publications, and existing subscribers can ask for duplicate copies of retained publications to be sent to them.

When deciding whether to use retained publications, we need to consider several factors.

 

Home