Stubbing settings for Kafka transport

You can specify the stubbing settings depending on the Message Exchange Pattern defined for the Kafka transport.

Before you begin

You must have defined a service component and an operation under the service component. See Creating a service component and Creating an operation

Procedure

  1. Double-click the operation in the Logical View tab of Architecture School perspective.

    The Operation dialog is displayed.

  2. Click the Stub tab.
    The Stub tab is displayed.
    image of the operation screen showing the subscribe settings.
  3. Complete the following steps in the Subscribe tab:
    1. Click Browse and select Kafka as the required transport in the Select a Resource dialog.
    2. Select from the following options for the action you want:
      Option Action
      No If you select No, you can select any transport in the project.
      Yes If you select Yes, you can select only transports that are referenced (directly or indirectly) by the operation that contains the test.
      Only Direct If you select Only Direct, you can select only transports that are referenced directly by the operation that contains the test.
    3. Click OK when finished.
    4. In the Topic field, enter the name of the topic on the Kafka server from which the message is to be subscribed.
    5. In the GroupID field, enter the subscriber group ID that you have created for the subscriber group. The subscriber must be a member of the subscriber group.
    6. In the Auto Offset Reset list, select from the following options that you want:
      Option Description
      earliest Automatically resets the offset to the earliest offset.
      latest Automatically resets the offset to the latest offset.
      none Displays an error to the subscriber if no previous offset is found for the subscriber group to which the subscriber belongs.
    7. The Default Timeout section contains common settings for stub replies. No change is required. The response time is managed by the stubs execution engine in Rational® Integration Tester.
  4. Click the Publish tab.
    The Publish tab is displayed.
    image of the operation screen showing the subscribe settings.
  5. Complete the following steps in the Publish tab:
    1. Click Browse and select Kafka as the required transport in the Select a Resource dialog.
    2. Select from the following options for the action you want:
      Option Action
      No If you select No, you can select any transport in the project.
      Yes If you select Yes, you can select only transports that are referenced (directly or indirectly) by the operation that contains the test.
      Only Direct If you select Only Direct, you can select only transports that are referenced directly by the operation that contains the test.
    3. Enter the name of the topic on the Kafka server to which the request message is to be sent in the Topic field.
      Note: Ensure to provide the actual topic names that you have in your application test. The topic name listed in the images are provided only as an example.
    4. Enter the partition ID in the Kafka Topic that receives the message in the PartitionID field.
    5. The Default Timeout section contains common settings for stub replies. No change is required. The response time is managed by the stubs execution engine in Rational® Integration Tester.