Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2023.2

...

Table of Contents
maxLevel1

...

Introduction

The Parasoft RabbitMQ Transport Extension adds support for the RabbitMQ transport to applicable messaging client tools in Parasoft SOAtest. RabbitMQ is a lightweight, reliable, scalable and portable message broker. Applications communicate with it via a platform-neutral, wire-level protocol: the Advanced Message Queuing Protocol (AMQP).

...

This tool can be installed from the UI or the command line.

UI Installation

  1. Choose Go to Parasoft> Preferences and click System Properties.
  2. In the System Properties preferences page, click Click Add JARs and choose rabbitmqtransport. Choose rabbitmqtransport.jar in the file browser. jar.
  3. Click Apply.
  4. Restart SOAtest/Virtualize.

Once this jar file is added to the SOAtest classpath, all of the required dependencies will be loaded.

Command Line Installation

Add the rabbitmqtransport.jar file to the system.properties.classpath property in your settings properties file. For example:

system.properties.classpath=<path to jar><PATH_TO_JAR>/rabbitmqtransport.jar

Once the classpath is modified, all of the required dependencies will be loaded.

...

The RabbitMQ Transport is primarily used in message client tools (e.g.client tools (for example, SOAP Client, EDI Client, and Messaging Client). The transport is configured in the Messaging Client's Transport tab. To use the RabbitMQ Transport in a Messaging Client, choose RabbitMQ (AMQP) from the Transport drop-down menu and configure the available options.

...

Host 

Defines the hostname of the RabbitMQ server. The default is localhost

Port 

Defines the port of the RabbitMQ server. The default is 5672 (5761 with SSL enabled). 

Use SSL 

Enables/disables SSL. The default is false

Username 

Defines the RabbitMQ username. The default is guest

Password 

Defines the RabbitMQ password. The default is guest

Virtual Host 

Defines the RabbitMQ Virtual Host to connect to. The default is / .

Automatic Recovery 

Set to true if the transport should attempt to automatically recover from connection failures. The default is true

Topology Recovery 

Set to true if if the listener should attempt to automatically recover from topological failures (i.e.that is, failures with exchanges or queues). Default is The default is true.

Publish Settings

Scroll Table Layout
widths30%,70%

Exchange Name 

Defines the exchange that the message is sent to. The default is default exchange

Routing Key 

Defines the routing key that will be used when sending the message. 

Mandatory 

Determines whether the message is published with the mandatory field set to true or false. The default is false

Immediate

Not supported in RabbitMQ 3.0 and higher. Determines whether the message is published with the immediate field set to true or false. The default is false

Basic Properties

Scroll Table Layout
widths30%,70%

App id 

Defines the identifier of the application that produced the message. 

Cluster id 

Deprecated in AMQP 0.9.1. Defines the intra-cluster routing identifier. 

Content Encoding 

Defines the message content encoding. Enter a MIME content type (e.g.for example, gzip). 

Content Type 

Defines the message content type. Enter a MIME content encoding (e.g.for example, application/json). The default is to use the request message's content type. 

Correlation Id 

Defines the ID of the correlated message (e.g.for example, the message that this is a reply to). 

Delivery Mode 

Determines if the message should be persisted to disk. Enter 1 for non-persistent, 2 for persistent. 

Expiration 

Defines the expiration time (in milliseconds) after which the message will be deleted. 

Headers 

Defines message headers. Enter a comma-separated list of key/value pairs.

Example:

key1=value1,key2=value2 

Message Id 

Defines the message identifier. 

Priority 

Defines the message priority. You can enter a number from 0 to 9

ReplyTo 

Defines the name of the queue to which the response should be sent. 

Timestamp 

Defines how to set the message timestamp. You can enter auto to use the current time , or enter a fixed date/time. If specifying a fixed date/time, use fixed yyyy-MM-dd HH:mm:ss format (e.g.for example, 2017-01-18 19:14:59) or locale default format M/d/yy h:mm a (e.g.for example, 1/17/17 7:15 pm for the US). UNIX timestamp format is also accepted. 

Type 

Defines the message type (e.g.for example, what type of event or command this message represents). 

User Id 

Defines the optional user ID. 

...

If the RabbitMQ transport is configured to wait for a reply message, these settings let you filter the reply messages by specifying response correlation parameters. If no correlation is configured (e.g.for example, all fields are empty), no filtering will be performed, and the transport will consume the first available reply message. If correlation is configured, the field entries will be evaluated from top to bottom; the first matching field will be used for correlation.

...

Keep connection alive/ Close connection after test execution 

The RabbitMQ transport allows multiple active connections to be used. If the connection settings match a connection that is already open, then it will reuse that connection. If any of the connection settings are different, then a new connection will be created.

Marking a test as "keep alive" (with Keep connection alive enabled) will tell SOAtest not to call close() on the connection at the end of that test's execution.

To close the connection, a test must be configured as "close connection" (with Close connection after test execution enabled). SOAtest will close the last connection used, which will be the connection used for that test.

Unlike with the built-in HTTP transport, there is no final cleanup of open connections for custom transports when all execution is finished. Instead, it is the user's responsibility to mark the last test of a given connection as "close connection," otherwise the connection will stay open.

For example, in the following scenario both connections will be kept open after the test run is over.

Settings A (keep alive)

Settings B (keep alive)

Settings A (keep alive)

Settings B (keep alive)

To fix this, you would mark the last test for each unique set of settings as "close connection".

Settings A (keep alive)

Settings B (keep alive)

Settings A (close connection)

Settings B (close connection)

...