Selecting the transport and formatter

You can select the transport and formatter for a subscribe action if you have not already configured the subscribe action in the MEP settings.

Procedure

  1. From the Test Factory view, open the test that contains the subscribe action.
  2. Double-click the Subscribe action to open it for editing.
  3. Click the Config tab, if it is not already open.

    The Transport field and Formatter list are displayed at the top of the tab.

    image of screen to select transport and formatter
  4. Click Browse and complete the following steps:
    1. Locate 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.
  5. In the Formatter list, select Kafka Message as the format of the published message.
  6. Expand the Subscriber Configuration panel, if not already expanded and complete the following steps:
    1. In the Topic field, enter the name of the topic on Kafka server from which the message is to be subscribed.
    2. 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.
    3. 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. Select the value attribute, right-click and select Schema, then click OK.

    image of screen to configure the message

  8. Click OK to save the Subscribe action.