This script requires Ant 1.6 or higher
NOTE: All options should be specified as system properties
on the command line, e.g.:
ant consumer -Durl=tcp://hostname:1234 -Dtopic=true
OR
ant producer -Durl=tcp://hostname:61616 -Dmax=1000
Usage:
ant <ant-task> <options>
--------------------------------------------------------
ant consumer <options> - Creates a consumer which waits until a specific number
of messages have been received
Consumer Options:
url - Used to specify acustom URL for the
broker, e.g., tcp://hostname:1234
topic - A boolean to determine whether to use
topics or queues; the default is false
subject - Used to specify a custom destination
name, e.g. MyDestination
durable - A boolean to specify that you want to
create a durable topic?
max - The maximum number of messages to wait
for before shutting down
clientId - A string to use as the client id
transacted - A boolean to specify that you want to use
transactions?
sleepTime - The time to sleep between message consumptions
verbose - Used to print out more info; the default is
true
ack-mode - The type of message acknowledgement to use;
see the Javadocs for javax.jms.Session for
more information
receive-time-out - An integer to specify the time to wait for
message consumption
parallelThreads - The number of parallel threads
batch - Batch size for transactions and client acknowledgment (default 10)
user - Connection username (if connecting to secured broker)
password - Connection password (if connecting to secured broker)
--------------------------------------------------------
ant producer <options> - Creates a producer publishing a number of messages
Producer Options:
url - Used to specify acustom URL for the broker,
e.g., tcp://hostname:1234
topic - A boolean to determine whether to use topics
or queues
subject - Used to specify a custom destination name,
e.g. MyDestination
durable - A boolean to specify that you want to create
a durable topic subscriber?
max - The maximum number of messages to wait for
before shutting down
sleepTime - The time to sleep between message consumptions
transacted - A boolean to specify that you want to use
transactions?
verbose - Used to print out more info; the default is true
messageSize - The size of the message in 1-byte characters
parallelThreads - The number of parallel threads
user - Connection username (if connecting to secured broker)
password - Connection password (if connecting to secured broker)
--------------------------------------------------------
ant -help - Display ant help screen
ant help - Display this message
ant clean - Delete the built directory
ant embedBroker - Runs an embedded broker inside Java code
ant war - Creates a WAR deployment unit of the ActiveMQ Broker
Running consumer against server at $$url = ${url} for subject $$subject = ${subject}
Running producer against server at $$url = ${url} for subject $$subject = ${subject}
Running requester against server at $$url = ${url} for subject $$subject = ${subject}
Running an embedded broker example
Running a Stomp example
Running a Log4j JMS Appender example