Sustained Tests has been created by Martin Ritchie (Jun 25, 2007).

Content:

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.

  • numReceives (Default : 2)
    This is the number of receivers each client node should create
  • batchSize (Default : 1000)
    This is the number of messages to send per batch
  • ackMode (Default : 1 - AUTO_ACK )
    The acknowledgement mode to use. Currently No_ack (257) appears not to work correctly.

The client also has one additional parameter.

  • "-j" can be used to join an existing test run. Dispite there being only one test case at present this class must be provided.

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 -j org.apache.qpid.performance.sustainedrate.SustainedTestClient

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.

Reply via email to