Recording Kafka transport traffic
The Kafka recording feature, which is not HTTP based, enables HCL DevOps Test Integrations and APIs (Test Integrations and APIs) to record Kafka transport traffic that is routed through the proxy.
Before you begin
- Reviewed the software requirements.
- In Test Integrations and APIs, you must have created the required physical Kafka transport broker resource. This action enables Test Integrations and APIs to connect to the physical Kafka transport broker that you want to use.
- Configured the proxy server in the registration.xml file of Test Virtualization 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 Test Integrations and APIs, 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
- In the Logical View, click the Kafka transport broker to open the Kafka broker dialog.
-
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.
- Click OK to save and close the broker dialog.
-
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:
- In Test Integrations and APIs, open the Recording Studio perspective.
- 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.
- Start a recording session by clicking Start Recording () on the toolbar of the Events View window and wait for recorded events.
- Stop the recording session by clicking 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.