Red Hat DocumentationFuse Message BrokerToggle FramesPrintFeedback

TransactedTalk Application

What the sample does

The transaction samples show that the transaction scope is between the client in the JMS session and the broker. When the broker receives commitment, the messages are placed onto queues or topics in the order in which they were buffered as standard messages. The following message delivery is normal:

  • Pub/Sub Messages Messages are delivered in the order entered in the transaction yet influenced by the priority setting of these and other messages, the use of additional receiving sessions, and the use of additional or alternate topics. The messages are not delivered as a group.

  • PTP Messages The order of messages in the queue is maintained with adjustments for priority differences but there is no guarantee thatwhen multiple consumers are active on the queuea MessageConsumer will receive one or more of the MessageProducers transacted messages.

Running the sample

To run PTP TransactedTalk sample do the following:

  1. In window 1, enter ant xntalk.

  2. In the console window that opens, type text in the window and press Enter.

  3. Repeat to produce a few messages.

  4. Type COMMIT in the window and press Enter.

  5. In window 2, enter ant qmonitor.

  6. In the QueueBrowser window, click Browse Queues.

    The messages are listed.

  7. In window 3, enter ant talk2.

    The window opens with the series of messages in Q1 from the TransactedTalker.

  8. In window 1, type some text, and press Enter.

  9. Repeat to produce a few messages.

  10. Type CANCEL in the window and press Enter.

    The batch of messages is dropped:

    • In window 3the talk2 window, no messages are received on Q1.

    • In the QueueBrowser window, Browse Queues lists no messages in Q1.

  11. In window 1, do the following:

    1. Type some text.

    2. Press Enter.

    3. Type COMMIT.

    4. Press Enter.

    The newly-committed transaction batch is received in window 3.

Stopping the sample

To stop the applications press Ctrl+C in each window.

Comments powered by Disqus