+

Search Tips | Advanced Search

Publications

Publications are messages that are sent by an application to the broker. The broker then sends the messages on to any applications that have subscribed to receive the messages.

Note: This information is for IBM® WebSphere MQ Version 6.0 queue managers only.

The broker can handle publications that it receives in different ways, depending on the type of information contained in the publication.


State and event information

Publications can be categorized by the type of information that they contain:


Retained publications

By default, when a broker has sent a publication to all interested subscribers, the broker deletes the publication. This type of processing is suitable for event information but is not always suitable for state information. A publisher can specify that the broker must 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 do not have to wait for information to be published again before they receive it. For example, a subscriber who registers a subscription to a stock price would receive the current stock price straightaway, without waiting for the stock price to change (and, therefore, be re-published).

The broker retains only one publication for each topic, so the old publication is deleted when a new one arrives. So, ensure that only one publisher is sending retained publications on each 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.