This page refers to an old Test Framework used by the Qpid Java components until 0.16.

Pub/Sub Sustained Tests

We currently have one sustained test for pub / sub messaging. The test is based on the interop testing framework and as such there are two classes that are involve.

  1. org.apache.qpid.sustained.TestClient
  2. org.apache.qpid.sustained.TestCoordinator

As with the Interop Tests the Test Coordinator collects various clients to work on the specified test. The sustained test suit currently only has one test which is the SustainedTestClient.

SustainedTestClient Test

This test is a pub/sub test. There is a single publisher that sends batches of messages to a known topic. The clients then receive these messages and report the time required to retrive all of the batch. This reported time is sent to the publisher so that it can adjust its publication rate to ensure that messages are sent at a rate that all clients can maintain.

Usage

The coordinator can take a number of parameters.

The client can take the following system parameters (set via -D properties)
(These values should be moved to the Coordinator so that you do not need to guess which client will become the sender as these values are only of use to the sending client.)

The client also has one additional parameter.

It is important to remember that each cilent must be uniquly named for the test to accurately work. This can be done by ensuring that all clients specify a unique "-n" value. So running

java -cp <qpid.jar> org.apache.qpid.sustained.TestClient -n client2 

Will correctly name the client 'client2' and attempt to joint the client to any running SustainedTestClient test. If there is no test running then the client will simply wait for the test to start.