...
The Rabbit MQ Message Listener is a custom message listener extension for Parasoft Virtualize. The listener connects to a Rabbit MQ broker and consumes messages on a specified queue. Depending on the mode of operation (passthrough or virtualize), the messages are forwarded to the real backend system or forwarded to Virtualize, respectively. This listener assumes the publisher uses the Reply To field to define the queue/routing key that will be used when sending the response. The listener also has options to enable the creation of the reply to queue on the fly or to use a predefined reply - to queue.
Implementation
The Rabbit MQ Message Listener is implemented as com.parasoft.virtualize.listener.rabbitmq-<version>.jar, which depends upon Rabbit MQ AMQP Client 5.2.0 (amqp-client-5.2.0.jar). This dependency is packaged with the distribution.
...
This tool can be installed from the UI or the command line.
UI Installation
- Choose Parasoft> Go to Parasoft > Preferences.
- In the Select System Properties preferences page, and click Add JARs.
- In the file chooser that opens, select com.parasoft.virtualize.listener.rabbitmq-<version>.jar. Once this jar file is added to the classpath, all of the required dependencies will be loaded.
- Restart Virtualize.
...
Configuring Connection Settings
Scroll Table Layout | ||
---|---|---|
|
Option | Description |
---|---|
Hostname | Defines the hostname of the Rabbit MQ server. If this field is empty, the listener will not startdefault value of |
Port | Defines the port of the Rabbit MQ server. If this field is empty, the default Rabbit MQ port will be used. |
Use SSL | Set to true to use SSL when connecting to the Rabbit MQ Server. Default is false . |
Username | Defines the Rabbit MQ username. |
Password | Defines the Rabbit MQ password. |
Virtual Host Name | Defines the Rabbit MQ Virtual Host to connect to. |
Automatic Connection Recovery | Set to |
Topology Recovery | Set to |
Configuring Listener Settings
Scroll Table Layout | ||
---|---|---|
|
Option | Description |
---|---|
Listener Mode | You can specify Passthrough mode forwards the messages on the Listen Queue to the exchange in Forward Exchange Name. Virtualize mode forwards the messages on the Listen Queue to Virtualize to generate a virtual response. |
Listen Queue | Defines the queue that from which Virtualize will consume message fromthe message. If empty, a temporary queue will be created. |
Binding Exchange | Defines the exchange to which the temporary queue binds. Only applies when using a temporary queue because Listen Queue is empty. |
Binding Key | Defines the binding key used when binding the temporary queue to the exchange. Only applies when using a temporary queue because Listen Queue is empty. |
Auto Ack | Set to |
Consumer Tag | Defines the consumer tag to use when consuming from a queue. |
Forward Exchange Name | Defines the exchange to use when forwarding the messages on the Listen Queue. This field is only used in Passthrough mode. |
Configuring ReplyTo Settings
Scroll Table Layout | ||
---|---|---|
|
Option | Description |
---|---|
ReplyTo Exchange | Defines the exchange to use when replying. This field is only used in Virtualize mode. |
ReplyTo Routing Key | Defines the routing key to use when replying. This field is only used in Virtualize mode. The request message's reply-to will take precedence over the one specified here. |
Generate ReplyTo Queue | Set to |
ReplyTo Queue Durability | Set to |
Autodelete ReplyTo Queue | Set to |
Configuring Logging Settings
Scroll Table Layout | ||
---|---|---|
|
Option | Description |
---|---|
Log Level | Set the log level for the listener. The following values are accepted:
Default is |