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.
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.
-
Open the Operation configuration panel and select the Message
Exchange Pattern tab.
-
Choose the pattern. For example, Publish/Subscribe Pattern.
-
In the Schema panel, you can select the schema or format that you want to apply.
-
Update the Transport field with RabbitMQ
connection both for Publish and Subscribe
tabs.
-
In the Binding panel, you can override the Producer
Settings that were defined in the transport under Producer
Settings:
-
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.
-
Select Exchange Type from the list.
Select from the following options:
- Direct
- Fanout
- Topic
- Header
-
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.
-
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. |
-
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. |
-
Add a header to a message by clicking the Headers tab and entering
appropriate values in the fields.
-
Add a property to the message by clicking the Properties tab and
entering appropriate values in the fields.