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. Click OK.
    4. Click the Kafka Properties tab and complete the following steps:
      1. Enter the name of the topic to which the message is to be published in the Topic field.
      2. Enter the partition ID of the Topic to which the message is to be published in the PartitionID field.
    5. Click the Parameters tab and complete the following steps:
      1. Click the Add Parameter icon Image of the Add parameter icon..

        The New Property dialog is displayed.

      2. Enter the name of the parameter that you want to use in the Name field.
      3. Enter the value of the parameter in the Value field.
      4. Click OK to save the parameter.
  5. Click the Subscribe tab.
  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. Click the Kafka Properties tab and complete the following steps:
      1. Enter the name of the topic to which the message is to be published in the Topic field.
      2. Enter the subscriber group ID in the GroupID field that you have created for the subscriber group. The subscriber must be a member of the subscriber group.
      3. Select any option from the following options in the Auto Offset Reset list:
        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.