+

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:

    State publications
    State publications contain information about the current state of something, such as the price of stock or the current score at a soccer match. When something happens (for example, the stock price changes or the soccer score changes), the previous state information is no longer required because it is superseded by the new information.
    A subscriber application wants to receive the current version of the state information on startup, and to be sent new information whenever the state changes.

    Event publications
    Event publications contain information about individual events that occur, such as a trade in some stock or the scoring of a particular goal. Each event is independent of other events.
    A subscriber wants to receive information about events as they happen.


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.

Parent topic: Configure publish/subscribe for IBM WebSphere MQ Version 6.0 queue managers


Related concepts


Related tasks

Last updated: 2020-10-04