Skip to content

hjchanna/jms-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jms-tool

Java CI with Maven

jms-tool is a command line utility tool that is used to troubleshoot JMS connections and related business use cases. Especially jms-tool could be used to pick erroneous messages from the message queues in order to continue business operations.

# download jms-tool
wget <url>

# run jms-tool
java -jar jms-tool.jar [options]

How to use jms-tool

A. Publish JMS Messages

java -jar jms-tool.jar publish 
            -url <connection url; required>
            -queue <queue name; required> 
            [-count <number of messages to be published; default: 1>] 
            [-message <message to be published; default: Test message %d generated by JmsTool>]
Example:
java -jar jms-tool.jar publish 
            -url "amqp://admin:password@clientid/carbon?brokerlist='tcp://wso2ei-broker-mgt:5675'"
            -queue test-queue

B. Consume JMS Messages

java -jar jms-tool.jar consume 
            -url <connection url; required>
            -queue <queue name; required> 
            [-count <number of messages to be consumed; default: 1>] 
            [-timeout <message consume timeout/ms; default: 5000ms>]
            [-nowait]
Example:
java -jar jms-tool.jar consume 
            -url "amqp://admin:password@clientid/carbon?brokerlist='tcp://wso2ei-broker-mgt:5675'"
            -queue test-queue
            -nowait

C. Help to use jms-tool

java -jar jms-tool.jar help 
Output:
Usage: <main class> [options] [command] [command options]
  Options:
    -v
      Verbose mode logging
      Default: false
  Commands:
    publish      Publish messages to a JMS queue
      Usage: publish [options]
        Options:
          -count
            Number of messages to be published
            Default: 1
          -message
            Message to be published to the queue
            Default: Test message %d generated by JmsTool
        * -queue
            JMS message queue name to publish messages
        * -url
            AMQP connection url of the message broker
            (amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?brokerlist='<broker
            url>[;<broker url>]'])

    consume      Consume messages from a JMS queue
      Usage: consume [options]
        Options:
          -count
            Number of messages to be consumed
            Default: 1
          -nowait
            Don't wait for messages
            Default: false
        * -queue
            JMS message queue name to consume messages
          -timeout
            Message receive timeout in milli-seconds
            Default: 5000
        * -url
            AMQP connection url of the message broker
            (amqp://[<user>:<pass>@][<clientid>]<virtualhost>[?brokerlist='<broker
            url>[;<broker url>]'])

    help
      Usage: help

Runtime dependancies

  • Java (Tested in OpenJDK 1.8)

Authors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages