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.
This topic contains the following sections:
Use the Publication node (or a user-defined node that provides a similar service) if your message flow supports publish/subscribe applications. Applications that expect 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 contained in the Routing drawer of the palette, and is represented in the workbench by the following icon:
Look at the following sample to see how to use this node:
You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.
For an example of how to 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.
When you have put an instance of the Publication node into a message flow, you can configure it; see Configuring a message flow node. The properties of the node are displayed in the Properties view. To display the properties of the node in the Properties dialog, either double-click the node, or right-click the node and click Properties. All mandatory properties for which you must enter a value (those that do not have a default value defined) are marked with an asterisk.
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 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 Description properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Node name | No | No | The node type: Publication | The name of the node. |
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. |
The Publication node Basic properties are described in the following table.
Property | M | C | Default | Description |
---|---|---|---|---|
Implicit Stream Naming | Yes | No | Cleared | Select Implicit
Stream Naming 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. |
Subscription Point | No | No | The subscription point value for the 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 in Using this node in a message flow). For more information, see Subscription points. |