The Scribble sample uses the publish/subscribe type of messaging to transport data. For more information, read about publish/subscribe messaging in the WebSphere Message Broker documentation.
ScribblePublisher and ScribbleSubscriber can transport publication messages using either WebSphere MQ transport or WebSphere MQ Real-time transport. The messages are formatted according to the type of transportation that you selected when you started each application, and the message format determines the way in which the messages enter and exit the message flow. All publication messages pass through the message flow regardless of the format of the message.
The Scribble sample performs the following actions:
The following sections describe the sample's resources in more detail:
The Scribble sample uses two formats of JMS messages:
All of the messages have a standard message template containing the following parts:
<map> <x1>point</x1> <y1>point</y1> <x2>point</x2> <y2>point</y2> </map>
When the ScribblePublisher application publishes messages using the Real-time type of message transport, the publication message is formatted differently from when ScribblePublisher publishes messages using the WebSphere MQ type of message transport. However, the Filter node in the ScribblePublish message flow can only parse messages that are formatted for WebSphere MQ transport. Because of this, the Real-time Input node transforms the format of the Real-time messages into WebSphere MQ messages so that the message flow nodes can parse the messages.
The Publication node in the message flow publishes WebSphere MQ messages to ScribbleSubscriber applications that are using WebSphere MQ messaging transport. However, if ScribbleSubscriber uses Real-time transport, the Publication node transforms the format of the message to Real-time when it publishes the messages.
For more information, read about JMS domains in the WebSphere Message Broker documentation.
The following figure shows the ScribblePublish message flow, which processes the publication messages in the Scribble sample.
The following table lists the types of nodes that are used in the ScribblePublish message flow.
Node type | Node name |
---|---|
MQInput | SCRIBBLE_PUBLICATION |
Real-timeInput | Real-timeInput |
Filter | Filter On Topic |
Compute | Invert Coordinates |
Publication | Publication |
For more information, read about the nodes in the ScribblePublish message flow in the WebSphere Message Broker documentation.
The ScribblePublish message flow transforms the coordinates published by the ScribblePublisher application, and then publishes the new coordinates to the ScribbleSubscriber application. For more information, read about message flows and message transformation in the WebSphere Message Broker documentation.
The ScribblePublish message flow performs the following actions:
The messages pass through the message flow as described regardless of the type of messaging transport used by the publisher and subscriber applications. However, because the Filter and Compute nodes in the message flow can parse only messages that are formatted for WebSphere MQ transport, the Real-timeInput node transforms Real-time messages into WebSphere MQ messages. Similarly, the Publication node transforms WebSphere MQ messages to Real-time messages if it is publishing them to the Real-time port.
To view the ESQL used in the ScribblePublish message flow in the workbench:
The ESQL for the Filter On Topic node is contained in the ScribblePublish_Filter module, and the ESQL for the Invert Coordinates node is contained in the ScribblePublish_Compute module. For more information, read about ESQL in the WebSphere Message Broker documentation.
The ScribblePublisher and ScribbleSubscriber applications publish information in JMS messages. Both applications can transport the messages using either WebSphere MQ or Real-time messaging transport.
When a Scribble application uses WebSphere MQ to transport its publication messages, it interacts with the WebSphere MQ local queues shown in the following table.
Queue | How the message flow uses the queue |
---|---|
SCRIBBLE_PUBLICATION | The message flow gets event publications that have been published to the queue by the ScribblePublisher application. |
SYSTEM.JMS.ND.SUBSCRIBER.QUEUE | The message flow puts publications on the queue for the ScribbleSubscriber application to take and publish to the broker. |
For more information about WebSphere MQ, see the WebSphere MQ product documentation.
When a Scribble application uses Real-time to transport its publication messages, it does not interact with WebSphere MQ queues. Instead, ScribblePublisher publishes to a Real-time port and ScribbleSubscriber gets publications from the same Real-time port. In this sample, the Real-time port number is 1566. For more information, read about WebSphere MQ Real-time Transport in the WebSphere Message Broker documentation.