MEP settings for RabbitMQ transport

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

Before you begin

You must have defined an operation. See Creating an operation.

About this task

By using the Message Exchange Pattern tab, you can specify the MEP settings. You can have all the MEPs that will be expressed with the combination of consumer or producer settings.

Procedure

  1. Open the Operation configuration panel and select the Message Exchange Pattern tab.
  2. Choose the pattern. For example, Publish/Subscribe Pattern.
    Image of the MEP page of the file tranport.
  3. Update the Transport field with RabbitMQ connection both for Publish and Subscribe tabs.
  4. In the Schema panel, you can select the schema or format that you want to apply.
  5. In the Binding panel, you can override the Producer Settings that were defined in the transport under Producer Settings:
    1. Enter the exchange name to be used for the publication in the Exchange Name field.
      This exchange corresponds to the exchange to which queues are supposed to be bound using the routing key.
    2. Select Exchange Type from the list.
      Select from the following options:
      • Direct
      • Fanout
      • Topic
      • Header
    3. Enter the routing key value to be used in the Routing Key field.
      When the default direct exchange type is selected, this routing key by convention, would correspond to a queue name.
    4. Select any of the following options:
      Option Description

      Declare

      This option enables this Exchange to be created dynamically or use the one that already exists.

      Passive Declaration

      This option enables the API to check if this Exchange object already exists and display an error if the object does not exist.

      Durable

      This option specifies the Exchange to be a durable Exchange as defined by the RabbitMQ specification.

      Auto Delete

      This option specifies the Exchange to be an auto-deleted Exchange as defined by the RabbitMQ specification.

    5. Select from the following publishing options in the Publish Flags section:
      Option Description

      Mandatory

      This option enables the broker to double-check that the message is routed to queues. When the mandatory field is not selected, the broker silently drops the message if it cannot be routed.

      Immediate

      This option enables the broker to immediately deliver the message to the consumer, which can receive the message.

  6. Add a header to a message by clicking the Headers tab and entering appropriate values in the fields.
  7. Add a property to the message by clicking the Properties tab and entering appropriate values in the fields.