About the Scribble sample

The Scribble sample uses the publish/subscribe type of messaging to transport data. For more information, see Publish/Subscribe in the IBM Integration Bus documentation.

ScribblePublisher and ScribbleSubscriber transport publication messages by using JMS, with WebSphere MQ as the underlying transport layer.

The Scribble sample performs the following actions:

  1. When you start the ScribbleSubscriber application, it subscribes to the topics scribble/coords and scribble/clear.
  2. When you start drawing in the ScribblePublisher window, ScribblePublisher publishes the coordinates of your drawing on the topic scribble/coords to the ScribblePublish message flow.
  3. The message flow checks that the message has been published on the scribble/coords topic and transforms the coordinates in the publication message.
  4. The ScribbleSubscriber application receives the messages that contain the transformed coordinates because it is subscribed to publications on the scribble/coords topic.
  5. When you click Clear in the ScribblePublisher application, ScribblePublisher publishes a message on the scribble/clear topic to the ScribblePublish message flow.
  6. The message flow does not transform the message data because the message was not published on the scribble/coords topic.
  7. The ScribbleSubscriber application receives the message because it has subscribed to publications on the scribble/clear topic.

The following sections describe the resources for the sample in more detail:

The messages

The Scribble sample uses WebSphere MQ JMS messages.

All of the messages have a standard message template containing the following parts:

The Publication node in the message flow publishes WebSphere MQ messages to ScribbleSubscriber applications.

For more information, see WebSphere Broker JMS Transport in the IBM Integration Bus documentation.

The message flow

The following diagram shows the ScribblePublish message flow, which processes the publication messages in the Scribble sample.

A screen capture of the ScribblePublish message flow.

The following table lists the types of nodes that are used in the ScribblePublish message flow.

Node type Node name
MQInput SCRIBBLE_PUBLICATION
Filter Filter On Topic
Compute Invert Coordinates
Publication Publication

For more information about the nodes that are used in the ScribblePublish message flow, see Built-in nodes in the IBM Integration Bus documentation.

The ScribblePublish message flow transforms the coordinates that are published by the ScribblePublisher application, and then publishes the new coordinates to the ScribbleSubscriber application. For more information, see Message flows overview in the IBM Integration Bus documentation.

The ScribblePublish message flow performs the following actions:

  1. The SCRIBBLE_PUBLICATION node gets the publication message from the SCRIBBLE_PUBLICATION queue.
  2. Filters the publication message on its topic:
  3. Transforms the coordinates that were published on the scribble/coords topic so that they display inverted in the ScribbleSubscriber application.
  4. Outputs the message. The message flow publishes the coordinates in a message to the SYSTEM.JMS.ND.SUBSCRIBER.QUEUE queue.

The ESQL

To view the ESQL that is used in the ScribblePublish message flow in the workbench, in the Application Development view of the IBM Integration Toolkit, double-click ScribblePublish.esql to open it in the ESQL editor.

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, see ESQL overview in the IBM Integration Bus documentation.

The message transports

The ScribblePublisher and ScribbleSubscriber applications publish information in JMS messages. Both applications use the WebSphere MQ transport.

WebSphere MQ transport

The Scribble applications interact with the WebSphere MQ local queues that are 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 integration node.

For more information about WebSphere MQ, see the WebSphere MQ product documentation.

Back to sample home