Publication node

This topic contains the following sections:

Purpose

Use the Publication node to filter output messages from a message flow and transmit them to subscribers who have registered an interest in a particular set of topics. The Publication node must always be an output node of a message flow and has no output terminals of its own.

Use the Publication node (or a user-defined node that provides a similar service) if your message flow supports publish/subscribe applications. Applications expecting to receive publications must register a subscription with a broker, and can optionally qualify the publications that they get by providing restrictive criteria (such as a specific publication topic).

If your subscriber applications use the WebSphere MQ Enterprise Transport to connect to the broker, you can define the queues to which messages are published as WebSphere MQ clustered queues or shared queues.

Publications can also be sent to subscribers within a WebSphere MQ cluster if a cluster queue is nominated as the subscriber queue. In this case, the subscriber should use the name of an "imaginary" queue manager that is associated with the cluster, and should ensure that a corresponding blank queue manager alias definition for this queue manager is made on the broker that satisfies the subscription.

The Publication node is represented in the workbench by the following icon:

Publication node icon

Using this node in a message flow

Look at the following sample to see how you can use this node:

For an example of how you can use this node, assume that you have written a publishing application that publishes stock updates on a regular basis. The application sends the messages to the broker on an MQInput node, and the stock publications are made available to multiple subscribers through a Publication node.

Configuring the Publication node

When you have put an instance of the Publication node into a message flow, you can configure it. Right-click the node in the editor view and click Properties. The node's basic properties are displayed.

All mandatory properties for which you must enter a value (those that do not have a default value defined) are marked with an asterisk on the properties dialog.

Configure the Publication node as follows:

  1. Select the Implicit Stream Naming check box to take the name of the WebSphere MQ queue on which the message was received by the message flow as the stream name. This property provides forward compatibility with WebSphere MQ Publish/Subscribe, and applies to messages with an MQRFH header when MQPSStream is not specified.

    Clear the check box if you do not want this action to be taken.

  2. Specify the Subscription Point for this Publication node. If you do not specify a value for this property, the default subscription point is assumed. This value uniquely identifies the node, and can be used by subscribers to get a specific publication (as described in the example scenario above).

    For more information, refer to Subscription points.

  3. Select Description in the properties dialog navigator to enter a short description, a long description, or both.
  4. Click Apply to make the changes to the Publication node without closing the properties dialog. Click OK to apply the changes and close the properties dialog.

    Click Cancel to close the dialog and discard all the changes that you have made to the properties.

Terminals and properties

The Publication node terminals are described in the following table.

Terminal Description
In The input terminal that accepts a message for processing by the node.

The following tables describe the node properties; the column headed M indicates whether the property is mandatory (marked with an asterisk on the properties dialog if you must enter a value when no default is defined), the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the bar file to deploy it).

The Publication node Basic properties are described in the following table.

Property M C Default Description
Implicit Stream Naming Yes No Cleared Whether to take the name of the WebSphere MQ queue on which the input message was received as the stream name. If you select the check box, this action is performed.
Subscription Point No No   The subscription point value for the node.

The Publication node Description properties are described in the following table.

Property M C Default Description
Short Description No No   A brief description of the node.
Long Description No No   Text that describes the purpose of the node in the message flow.