Hi, I happened to write a command line JMS Client for test purposes. It can be used Andes or any typical JMS broker. It can
1. send a message to a specified queue * sh andesClient.sh q send * 2. send specified number of messages to a specified queue. Messages will be tagged by a message flag (which can be set using config) and message count number will be set as the text, so that message can be uniquely identified (useful when receiving and matching). *sh andesClient q send <number of messages>* 3. listen for messages from a queue (receive) * sh andesClient q receive* 4. publish a message to a specified topic. * sh andesClient t publish* 5. subscribe to a topic and listen for messages. * sh andesClient t subscribe* * * * * *In the config file queue, topic and many other parameters can be set.* * * # Following are connection properties # Define client id name here andes_client_id=carbon # Define virtual host name you want to connect virtualHost_name=carbon # Username to connect username=admin # Password to connect password=admin # List of brokers in the form <ip>:<port>;<ip>:<port>. If defined more than one <ip>:<port> #list fail-over will happen according to round robin. brokerList=127.0.0.1:5672;127.0.0.1:5673 # Following are Queue properties # Name of the queue message to be sent queueName =testQueueNew # When sending more than one message you can define the interval between two sent messages interval_between_sending_messages=200 # When receiving more than one message you can define interval between two received messages (i.e like time to process message) interval_between_receiving_messages=200 # Flag to identify messages from this node messageFlag=<node0> # Topic properties # Name of the topic message to be sent topicName=myTopic # Message to be sent to topic or queue message=Test Message Checkout the source from this link: https://svn.wso2.org/repos/wso2/scratch/hasitha/AndesTestClient/ Note that you have to set *ANDESCLIENT_HOME* and *JAVA_HOME* environmental variables. Thanks. -- *Hasitha Abeykoon* Software Engineer; WSO2, Inc.; http://wso2.com *cell:* *+94 719363063* *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>* * * *
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
