Giter Club home page Giter Club logo

rfh4j's Introduction

rfh4j

Try to make something like RFHUtil with Java and Blackjack.

Examples:

  • Connection configuration:

    • Use default.properties: ./rfh4j.sh (nothing else, it used by default)
    • Specify non default config: ./rfh4j.sh --config myconn.properties
    • Use CLI: ./rfh4j.sh --hostname=mqhome.mydomain.org --port=1414 -Q DEFQM --userID=mqgod --password=123 -c JVM.DEF.SVRCONN
    • Combination: ./rfh4j.sh --config myconn.properties --hostname=mqhome.mydomain.org -c JVM.DEF.SVRCONN
    • Connect in binding mode: --transport=binding
    • Connect in client mode (default): --transport=client
  • Get messages

    • Get(--srcq) and print to console(--stream) body to console --srcq RFH.QTEST.QGENERAL1 --stream
    • Get, print with wait (--wait milsec) --srcq RFH.QTEST.QGENERAL1 --stream --wait 5000
    • Get, wait and save to file(--payload) (name is msgID) --srcq RFH.QTEST.QGENERAL1 --wait 5000 --payload /tmp/
  • Put message

    • Put (--dstq) text (--text) message: --dstq Q.APPLICATION_OUT --text someText
    • Put file (-p, --payload) as payload: --dstq Q.APPLICATION_OUT -p ~/myfile.xml
    • Put message as redirected stream(-s, --stream) --config default.properties --dstq Q.APPLICATION_OUT -s < ~/developer/projects/MQCluster/src/spring.xml
    • Put file as payload 100 times (--times): --dstq Q.APPLICATION_OUT -p ~/myfile.xml --times 100
  • Activity log (MQ online monitoring)

    • Listen with redirect stream: --srcq SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE --stream --limit -1 > /tmp/online.log
    • Get 50 records with spec. formatter: --srcq SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE --stream --limit 50 --formatter=ru.codeunited.wmq.format.MQFTMAdminCommonFormatter
  • Inquiry

    • Get queues status without filter (--lslq)./rfh4j.sh --lslq
    • Get queues status with filter (--lslq wildcard)./rfh4j.sh --lslq TESTQ.*

usage: rfh4j [--all] [-c ] [--config ] [--dstq ] [--formatter ] [-h] [-H ] [--handler  | -p  | -s | -t ] [--limit ] [--lslq ] [-P ]  [--password ] [-Q ]  [--srcq ]
       [--times ] [--transport ] [-u ] [-v ] [-w ]
Option description
        --all                            Applicable to GET command
     -c,--channel               WMQ SVRCON channel name
        --config            Configuration file for WMQ connection (use it like c,H,P,Q,u)
        --dstq                    Destination queue
        --formatter                 Special formatter class name
     -h,--help                           Help information
     -H,--hostname       WMQ QM host name or ip address (localhost is default).
        --handler 
        --limit                     Limit GET command. This is maximum messages or use negative value for infinity mode
        --lslq                  List localqueues with filter. Default value is * (means all).
     -P,--port                     WMQ QM listener port (1414 is default).
     -p,--payload                  File to send.
        --password        WMQ QM user password.
     -Q,--qmanager        WMQ queue manager name
     -s,--stream                         Stream for message (std in/out).
        --srcq                    Source queue
     -t,--text                     Text for message.
        --times                     Repeat count. Supported for MQPUT now.
        --transport      WMQ transport type
     -u,--userID                WMQ QM user id.
     -v,--verbose                   Print additional output
     -w,--wait             Wait specified amount of time.
Usage examples:
1) Send text message to a queue (host, port, channel are default)
rfh4j.sh --dstq RFH.QTEST.QGENERAL1 -t hello!
2) Get message from a queue and print to console
rfh4j.sh --srcq RFH.QTEST.QGENERAL1 --stream
3) Get message from a queue with timeout and put to file with default name
rfh4j.sh --srcq RFH.QTEST.QGENERAL1 --wait 5000 --payload /tmp/
4) List all local queues
rfh4j.sh  --lslq
5) List all local queues with filter
rfh4j.sh --lslq MYQ*

rfh4j's People

Contributors

ikonovalov avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.