MEP settings for Kafka transport

The Kafka transport uses a publish or a subscribe Message Exchange Pattern (MEP). When you create a test by using MEP, the test contains a publish or a subscribe action as required. You can specify the default options for publish actions with or without the subscribe action by using the settings on the Message Exchange Pattern tab.

Before you begin

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

Procedure

  1. Open the Operation configuration panel and select the Message Exchange Pattern tab.
  2. Choose the Publish/Subscribe pattern. You can choose only the Publish or Subscribe pattern, if you want.
  3. Click the Publish tab, if it is not already open.
    Image of the MEP page of the file tranport.
  4. Complete the following steps in the Publish tab:
    1. Click Browse and select Kafka as the required transport in the Select a Resource dialog box.
    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. In the Topic field, enter the name of the topic to which the message is to be published.
    4. In the PartitionID field, enter the partition ID of the Topic to which the message is to be published.
  5. Click the Subscribe tab.
    Image of the MEP page of the file tranport.
  6. Complete the following steps in the Subscribe tab:
    1. Click Browse and select Kafka as the required transport in the Select a Resource dialog box.
    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 any option from the following options:
      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. Click OK to save the MEP settings and exit from the operation settings window.