Hi, I wrote a comprehensive client to send/receive and analyse JMS messages to WSO2 MB. It is easy to use - go to bin folder and execute andesClient script with parameters Please find the source at [1]. You might need to put and rebuild with latest andes-client when using. Following are the operations supported with example commands to run in terminal
First parameter is *mode*. send - send messages to queues/topic receive - receive messages browse - browse messages for queues purge - purge messages of a queue analyse - analyse received data for missing messages, duplications, message orders etc cassandra - analyse cassandra data connecting to cassandra via hector - if mode is send/receive other parameters should be hosts host1:port,host2:port; destinations queue:q1,q2,q3|topic:t1,t2,t3; (recommended to use only queues or topic at once) printNumberOfMessagesPer 100 (this will set how often to print the message count.) isToPrintEachMessage false numOfSecondsToRun 600 count 1000; numOfThreads 5; params listener=true,durable=false,subscriptionID=sub1,file="",ackMode=AUTO,delayBetweenMsg=200,stopAfter=12,ackAfterEach=300,commitAfterEach=300,rollbackAfterEach=400,unsubscribeAfter=500 (all parameters are optional) connectionString (optional - if given it will override the connection string made by username/password/host/port. This is useful for failover testing) example command: *sh andesClient.sh receive 127.0.0.1:5672 <http://127.0.0.1:5672> queue:myQueue1 1 true 100 1000 1 listener=true,ackMode=1,delayBetweenMsg=0,stopAfter=1000 ""* parameters are always key-value pairs. Be sure not to input a key without a value (eg: file=""). Instead get rid of key. - if mode is browse other parameters should be mode browse host Name And Port localhost:5672 destination myQueue print Number Of Messages Per 100 is To Print Each Message false example command *sh andesClient.sh browse localhost:5672 myQueue 100 false* NOTE: more than one hostname or more than one queue is not supported - if mode is purge other parameters should be mode purge host name and port localhost:5673 destination myQueue - if mode is analyse other parameters should be printMessages - print messages received printDuplicates - print duplicate messages if any printMissing - print missing messages given the number of messages expected printSorted - print received messages in sorted order checkOrder - check if messages are in oder. This gives the place where order is broken if order is broken clearFile (for printMissing pass how many messages were expected) Note: if you send messages from a file this is not supported - if mode is cassandra other parameters should be connectionString - host:port:username:password (optional - if not given assume localhost:9160:admin:admin) operation - gq <globalQueueName> / nq <nodeQueueName> / tnq <topicNodeQueueName> / count <queueName> / content / metadata / subscribers /hash <destination> and other parameters as necessary gq - get global queue info (cassandra 10.100.1.146:9160:admin:admin gq GlobalQueue_1) nq - get node queue info (cassandra 10.100.1.146:9160:admin:admin nq NodeQueue_1) tnq - get topic node queue info (cassandra 10.100.1.146:9160:admin:admin tnq TopicNodeQueue_1) count - get cassandra message count for queue content - list content info metadata - list metadata info subscribers - list topic subscribers info hash - get the global queue name a given destination is hashed to NOTE: more than one hostname or more than one queue is not supported [1]. http://svn.wso2.org/repos/wso2/people/hasithah/MBTestProjectNew Thanks -- *Hasitha Abeykoon* Senior Software Engineer; WSO2, Inc.; http://wso2.com *cell:* *+94 719363063* *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev