252 Messaging Solutions in a Linux Environment
1. Click Selection in the top-center of Figure 7-41 on page 250.
2. Right-click a starting node and select Create Connection.
3. A dialog box appears that lists the node’s output terminals. Select an output
terminal (which becomes the origin of the connection), and click OK to return
to the editor view.
4. To complete the connection, position the mouse pointer over the desired
destination input terminal of the target node and click that node.
The message flow with all the nodes connected is shown in Figure 7-43.
Figure 7-43 Nodes connected to each other
Alternative views
An alternative way of looking at the connections between nodes is the Outline
view, shown in Figure 7-44 on page 253.
Chapter 7. Implementing highly available brokers 253
Figure 7-44 Outline view of the connected nodes
To see a neater view of the message flow, right-click any place in the message
flow editor and select Manhattan Layout. The resulting formatting change to the
message flow is shown in Figure 7-45.
Figure 7-45 Message flow in Manhattan layout
254 Messaging Solutions in a Linux Environment
The default names of the nodes do not clarify the intended function. Therefore,
naming the nodes appropriately might help you to quickly understand a message
flow. Right-click any node and select Rename.
Figure 7-46 Rename node for functionality
Figure 7-47 shows the message flow with the nodes renamed to reflect the
intended functionality.
Figure 7-47 Message flow after renaming nodes
Setting node properties
Several properties needs to be set on the nodes in this message flow. The
properties of a node are accessed by right-clicking on a node and selecting
Properties.
Chapter 7. Implementing highly available brokers 255
Properties of the MQInput node
The input of this message flow are the messages generated by the message
generation application. This message is a delimited message that does not carry
any header to detail the type or format of the message. Such a header, called
MQRFH2, would limit the amount of information to be provided in the MQInput
node. Since this header is not required, the message flow developer has to
provide these details so that the broker knows how to handle any incoming
message.
1. To set the properties of the MQInput node, right-click the node and select
Properties (see Figure 7-48). In the section Basic, provide the name of the
input queue, which is cq in our scenario.
Figure 7-48 TDSInput Node properties
2. Select the Default section and provide details about the incoming messages,
as shown in Figure 7-49 on page 256. In this window, we specify the Message
Domain, which is MRM. Next, select the message set from the drop-down list.
Note that the identifier is unique to our environment. The field Message Type
should be set to the name of the message as defined in the message set,
which is ResourceUsage. The Message Type tells the broker what the logical
format of the message is. The Message Format field, selected from a
drop-down list, provides the name of the physical format of the message.
Here the Message format is TDS1.
256 Messaging Solutions in a Linux Environment
Figure 7-49 TDSInput node default property
Properties of the Trace node
The Trace node is one way to debug a message flow and to obtain information at
runtime about the processing of a message. The output of a Trace node can be
redirected to a file on the file system, or to an operating system specific logging
mechanism or to the user trace. The user trace is a broker trace that can be
activated and deactivated at runtime.
Trace records generated by the Trace node can include any text, date and time
information and also portions or the complete parsed message.
You can identify parts of the message to be written to the trace record, specifying
the full field identifiers enclosed within the characters ${ and }. If you want to
record the entire message, specify ${Root}, as shown in Figure 7-50 on
page 257.

Get Messaging Solutions in a Linux Environment now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.