Selecting the transport and formatter

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

Procedure

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

    The Transport field and Formatter lists 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.
      Important: Ensure to select the transport name as Kafka Connection as it is the logical transport that is used as the transport.
    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.
  5. In the Formatter list, select Kafka Message as the format of the published message.
  6. Expand the Message Header panel, if not already expanded and complete the following steps:
    1. In the Topic field, enter the name of the topic on the Kafka server to which the message is to be published.
    2. In the PartitionID field, enter the partition ID in the Kafka topic that receives the message.
  7. Complete the following steps to configure the Kafka message before completing the publish action:
    1. Select the value attribute, right-click and select Schema (if you want to provide a string value), then click OK.
    2. Enter the value against data under the value attributes. The values you enter form part of the message to be published as the values for the value attribute.

    image of screen to configure the message

  8. Click OK to save the publish action.