Recording MQ telemetry traffic

You can use Rational® Integration Tester to record MQ telemetry transport traffic by connecting to the MQ telemetry transport broker that you want to use and subscribing directly to topics communicated from that broker.

Before you begin

Software requirements:
  • Rational® Integration Tester
  • Access to a physical MQ telemetry transport broker and to one or more MQ telemetry transport clients
Complete the following tasks:
  1. In Rational® Integration Tester, create the required physical MQ telemetry transport broker resource. Completing this task enables Rational® Integration Tester to connect to the physical MQ telemetry transport broker that you want to use.
  2. Determine the number of topics that you want to record:
    • If you want to record many topics, create a logical MQ telemetry transport connection. Completing this task enables Rational® Integration Tester to record logical resources.
      Note: In the Recording tab of the MQTT Connection window, you have the option to specify the topics that are to be matched when recording.
    • Alternatively, if you want to record only one topic, you can create an operation to specify the topic to which the data is published. In the Message Exchange Pattern tab in the Operation window, complete the following tasks:
      1. Click Browse to select the physical MQ telemetry transport broker resource that you want to use for recording.
      2. In the Topic field, enter the name of the topic that you want to record.
      3. Optional: In the Client ID field, enter a 23-byte string to identify the operation as a specific MQ telemetry transport client.

About this task

In Rational® Integration Tester, MQ telemetry transport traffic is recorded by connecting to the MQ telemetry transport broker that you want to use and subscribing directly to topics communicated from that broker.

You can create tests and stubs from any events captured in the Recording Studio perspective.

Procedure

  1. In Rational® Integration Tester, open the Recording Studio perspective.
  2. Create an event monitor for recording traffic from the MQ telemetry transport broker:
    In the Select a Resource window:
    • Select a logical MQ telemetry transport connection if you want to record multiple topics.
    • Alternatively, select an operation if you want to record only a single topic.
  3. Start a recording session by clicking Start Recording (Start Recording) on the toolbar of the Events View window.
  4. Wait for recorded events.
  5. Stop the recording session by clicking Pause recording (Pause recording) on the toolbar of the Events View window.

Results

All events captured are displayed in the Events View of Recording Studio as publish actions in Byte Array message format.

This means that Rational® Integration Tester does not distinguish between publish and subscribe actions in data flows between MQ telemetry transport clients and consumers.

It also means that Rational® Integration Tester does not take into account the direction of messages between physical MQ telemetry transport brokers and MQ telemetry transport client applications.

You can use the Recorded Events wizard to save the recorded events as a test, stub, or other project resource.