Running the JMS Nodes sample

A Java driver called JMSNodeSample is provided to drive the sample after all the configuration steps have been completed. Run this code from the Message Brokers Toolkit.

Input test messages

All the test messages used in running this sample are based on the following format:

<Parent>
<First>1</First>
<SaleList>
<Invoice>
<Timestamp></Timestamp>
<Initial>T</Initial>
<Initial>D</Initial>
<Surname>Montana</Surname>
<Item><Code>00</Code>
<Code>01</Code><Code>02</Code>
<Description>Twister</Description>
<Category>Games</Category>
<Price>00.30</Price>
<Quantity>01</Quantity>
</Item>
<Item>
<Code>02</Code><Code>03</Code><Code>01</Code>
<Description>The Times Newspaper</Description>
<Category>Books and Media</Category>
<Price>00.20</Price>
<Quantity>01</Quantity>
</Item>
<Balance>00.50</Balance>
<Currency>Sterling</Currency>
</Invoice>
</SaleList>
<Last>Test</Last>
</Parent>

Running the sample

The JMSNodeSample driver contains the following files:

To run the sample:

  1. In the Message Brokers Toolkit, switch to the Broker Application Development perspective.
  2. In the Resource Navigator, expand the JMS Node Sample project, then expand src and jmsnode.
  3. Right-click IPSubscriber.java, then click Run > Java Application. The IPSubscriber file runs. IPSubscriber connects only after the message flow is deployed and started. The IP subscribers receive one message, display it, and then stop.
  4. Use Enqueue to put the message.enqueue file on the INPUTQUEUE queue.
    1. In the Resource Navigator view, expand the JMS Sample project, then double-click message.enqueue to open it in the Enqueue editor.
    2. Change the name of the queue from inputqueue to INPUTQUEUE.
    3. Click Write To queue.
    The message is put on the INPUTQUEUE queue.

When the message is put on the INPUTQUEUE queue, the message passes through the message flows and is received by the IP subscribers. The message is displayed in the console view in the Message Brokers Toolkit.

Output test messages

The output message representing an invoice has the following format:

<Parent>
<First>1</First>
<SaleList>
<Invoice>
<Timestamp>2005-01-01 10:10:59</Timestamp>
<Initial>T</Initial>
<Initial>D</Initial>
<Surname>Montana</Surname>
<Item><Code>00</Code>
<Code>01</Code><Code>02</Code>
<Description>Twister</Description>
<Category>Games</Category>
<Price>00.30</Price>
<Quantity>01</Quantity>
</Item>
<Item>
<Code>02</Code><Code>03</Code><Code>01</Code>
<Description>The Times Newspaper</Description>
<Category>Books and Media</Category>
<Price>00.20</Price>
<Quantity>01</Quantity>
</Item>
<Balance>00.50</Balance>
<Currency>Sterling</Currency>
</Invoice>
</SaleList>
<Last>Test</Last>
</Parent>

Main Page icon   Back to sample home