1- A number of examples are packaged with the source distribution and with the
2- tests jar in the binary distribution. These examples vary in complexity from
3- simple clients and servers through to complex test harnesses that are used for
4- testing the RabbitMQ server.
1+ Overview
2+ ========
53
6- The source code for the examples can be found in the test/src/com/rabbitmq/examples directory of the source distribution.
4+ A number of examples are packaged with the source distribution and
5+ with the tests jar in the binary distribution. These examples vary in
6+ complexity from simple clients and servers through to complex test
7+ harnesses that are used for testing the RabbitMQ server.
78
8- RUNNING EXAMPLES
9+ The source code for the examples can be found in the
10+ test/src/com/rabbitmq/examples directory of the source distribution.
911
10- The script runjava.sh or runjava.bat can be found in the top level directory of
11- the binary distribution or in the scripts directory of the source distribution.
12- This script can be used to run the examples, for example if you have a RabbitMQ
13- broker running and you open two shell or console windows you can test basic
12+
13+ Running the Examples
14+ ====================
15+
16+ The script runjava.sh or runjava.bat can be found in the top level
17+ directory of the binary distribution or in the scripts directory of
18+ the source distribution.
19+
20+ This script can be used to run the examples. For instance, if you are
21+ using the binary distribution and if you have a RabbitMQ broker
22+ running and you open two shell or console windows you can test basic
1423connectivity like this:
1524
1625shell-1$ ./runjava.sh com.rabbitmq.examples.SimpleConsumer
@@ -20,14 +29,27 @@ shell-2$ ./runjava.sh com.rabbitmq.examples.SimpleProducer
2029shell-1$ ./runjava.sh com.rabbitmq.examples.SimpleConsumer
2130Message: the time is Fri Feb 26 08:28:58 GMT 2010
2231
23- The more complex examples will require additional command line arguments and
24- it is best to examine the source of the examples to determine what arguments
25- are available.
32+ Running the examples from the source distribution requries two more
33+ preliminary steps:
34+
35+ shell-1$ ant dist
36+
37+ shell-1$ cd build/dist/
38+
39+ Now, the examples can be run exactly as detailed above.
2640
27- All examples live in the com.rabbitmq.examples package so add that package name
28- to the examples described below to produce the full classname that is required as the first argument to the runjava script.
29-
30- SIMPLE EXAMPLES
41+ The more complex examples will require additional command line
42+ arguments and it is best to examine the source of the examples to
43+ determine what arguments are available.
44+
45+ All examples live in the com.rabbitmq.examples package, so just add
46+ that package name to the examples described below to produce the full
47+ classname that is required as the first argument to the runjava
48+ script.
49+
50+
51+ Simple Examples
52+ ===============
3153
3254SimpleProducer - Sends a message to an exchange.
3355SimpleConsumer - Reads a message from a queue.
@@ -43,9 +65,12 @@ HelloJsonServer - Acts as a JSON-RPC server over AMQP.
4365LogTail - Tails the server logs.
4466SendString - Sends a user supplied message over AMQP.
4567
46- MORE COMPLEX EXAMPLES
4768
48- Most of these examples are used in testing and tuning the RabbitMQ server.
69+ More Complex Examples
70+ =====================
71+
72+ Most of these examples are used in testing and tuning the RabbitMQ
73+ server.
4974
5075BufferPerformanceMetrics - Tests buffer sizing.
5176ChannelCreationPerformance - Test different Channel creation strategies.
@@ -57,5 +82,3 @@ SpammyTopicProducer - Sends lots of different topic messages over AMQP.
5782StressPersister - Stress test for persister.
5883TestMain - RabbitMQ server regression tests.
5984TracerConcurrencyTest - Tests correct concurrency behaviour of RabbitMQ tracer.
60-
61-
0 commit comments