Skip to content

Commit b4ba992

Browse files
author
Alexandru Scvortov
committed
cleaned up README-EXAMPLES
1 parent c3a31af commit b4ba992

File tree

2 files changed

+46
-22
lines changed

2 files changed

+46
-22
lines changed

README-EXAMPLES

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
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
1423
connectivity like this:
1524

1625
shell-1$ ./runjava.sh com.rabbitmq.examples.SimpleConsumer
@@ -20,14 +29,27 @@ shell-2$ ./runjava.sh com.rabbitmq.examples.SimpleProducer
2029
shell-1$ ./runjava.sh com.rabbitmq.examples.SimpleConsumer
2130
Message: 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

3254
SimpleProducer - Sends a message to an exchange.
3355
SimpleConsumer - Reads a message from a queue.
@@ -43,9 +65,12 @@ HelloJsonServer - Acts as a JSON-RPC server over AMQP.
4365
LogTail - Tails the server logs.
4466
SendString - 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

5075
BufferPerformanceMetrics - Tests buffer sizing.
5176
ChannelCreationPerformance - Test different Channel creation strategies.
@@ -57,5 +82,3 @@ SpammyTopicProducer - Sends lots of different topic messages over AMQP.
5782
StressPersister - Stress test for persister.
5883
TestMain - RabbitMQ server regression tests.
5984
TracerConcurrencyTest - Tests correct concurrency behaviour of RabbitMQ tracer.
60-
61-

scripts/runjava.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ for d in `dirname $0`/*.jar
44
do
55
RABBIT_JARS="$d:$RABBIT_JARS"
66
done
7-
exec java -cp "$RABBIT_JARS" "$@"
7+
exec java -cp "$RABBIT_JARS" "$@"
8+

0 commit comments

Comments
 (0)