Recording Kafka transport traffic

The Kafka recording feature, which is not HTTP based, enables Rational® Integration Tester to record Kafka transport traffic that is routed through the proxy.

Before you begin

You must have completed the following tasks:
  • Reviewed the software requirements.
  • In Rational® Integration Tester, you must have created the required physical Kafka transport broker resource. This action enables Rational® Integration Tester to connect to the physical Kafka transport broker that you want to use.
  • Configured the proxy server in the registration.xml file of Rational® Test Control Panel.
    Note: If you have multiple broker nodes in your cluster you must configure the proxy server for each of the broker nodes with separate entries in the registration.xml.
  • Restarted the HTTP/TCP proxy after making changes in the registration.xml file.

About this task

In Rational® Integration Tester, Kafka transport traffic is recorded by connecting to the Kafka transport broker that you want to use and by monitoring the proxy server configured.

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

Procedure

  1. In the Logical View, click the Kafka transport broker to open the Kafka broker dialog.
  2. Click the Recording Studio tab and enter the name of the topic to be recorded in the field box in the Filter panel.
    Note: When you select the Use Pattern check box, you can enter each topic to be recorded on a separate line or you can use wild cards .* to specify all the topics on the selected broker.
    Restriction: The specified pattern for topics to be recorded is not supported when the recording is enabled through the configured proxy.
  3. Click OK to save and close the broker dialog.
  4. To configure the recording mode, in the Physical View, click the Kafka transport broker to open the Kafka broker dialog and complete the following steps:
    1. Click the Recording and Stubbing tab.
    2. Select the option you want from the list in the Mode field:
      Mode Description
      Direct Record events for Kafka messages routed through the configured port for Kafka.
      Use Sift & Pass-Through with Proxy Record events for Kafka messages that are sifted for the set criteria and the passed ones are routed through the configured proxy port.
    3. Click OK to save the configured settings and close the dialog.
  5. In Rational® Integration Tester, open the Recording Studio perspective.
  6. Create an event monitor for recording traffic from the Kafka transport broker or from the created operation from the Select a Resource window. Complete the selection in the window displayed for the options you want.
  7. Start a recording session by clicking Start Recording (image of the icon) on the toolbar of the Events View window and wait for recorded events.
  8. Stop the recording session by clicking Pause recording (image of the icon to 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 or subscribe actions in Byte Array or text format as expressed by the content type.

What to do next

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