Sunday 1 June 2014

IBM MQ Overview

IBM MQ
  • A member of  websphere family from IBM. Websphere MQ (formally MQseries) is the standard for messaging across multiple platforms, including windows, linux, IBM mainframe and midrange and Unix flavors.
  • A middleware product that implements a messaging and queuing framework
  • Middleware - an intermediate software component that bridges dissimilar computing environments. 
  • WebSphere MQ is your complete universal messaging backbone, enabling rapid, reliable, and secure transport of messages and data between applications, systems, and services.
  • It accelerates the flow of messages across organizations without complexity, cutting costs and reducing maintenance, improving business responsiveness and connecting to new solutions and technologies from the mainframe to the mobile enterprise.

    "WebSphere MQ is an assured delivery mechanism, which consists of queues managed by Queue Managers. We can put messages onto, and retrieve messages from queues, and the movement of messages between queues is facilitated by components called Channels and Transmission Queues."

    Saturday 15 February 2014

    IBM WebSphere MQ Client Overview

    An IBM WebSphere MQ client is part of the IBM WebSphere MQ product that can be installed on its own, on a separate machine from the MQ server. You can run an IBM WebSphere MQ application on an IBM WebSphere MQ client, which interacts with one or more IBM WebSphere MQ servers. The IBM WebSphere MQ client connects to queue managers by means of a communications protocol. The servers to which the client connects might or might not be part of an IBM WebSphere MQ cluster.


    The queues and other IBM WebSphere MQ objects are held on a queue manager that you have installed on an MQ server machine. When the application issues a client call, the IBM WebSphere MQ client directs the request to a queue manager, where it is processed and from where a reply is sent back to the IBM WebSphere MQ client. The link between the MQ application and the IBM WebSphere MQ client is established dynamically at runtime.

    Thursday 6 February 2014

    Messages Backup On Queues Using Qload & Unload Utility

    Create Queue Manager:
                    CRTMQM QM1
    Start Queue Manager:
                    STRMQM QM1
    Get RUNMQSC Console For Queue Manager:
                    RUNMQSC QM1
    Create Two Local Queues:
                    DEFINE QLOCAL(Q1)
                    DEFINE QLOCAL(Q2)

    Put 10 messages into Q1.

    Download MO03 Support Pack To Do Following Operations.

    Unload a Queue to a File
    qload –m QM1 –i Q1 –f c:\myfile
    Load a Queue from a File
    qload –m QM1 –o Q1 –f c:\myfile
    Copy the messages from one Queue to another Queue
    qload –m QM1 –i Q1 -o Q2 
    Copy the first 10 messages from one Queue to another Queue
    qload –m QM1 –i Q1 –o Q2 –r#10

    Option
    Meaning
    x
    Process message number x only.
    x..y
    Process message number x through y only
    x#y
    Process y messages starting from message x
    #y
    Process y messages starting from the beginning.
    Note: This is the same as 1#y

    Move the messages from one Queue to another Queue
    qload –m QM1 –I Q1 –o Q2


    Saturday 11 January 2014

    Dead Letter Handler Configuration Using Service Object

    Configuring the DLQ Handler as a server service object:
    To run the DLQ handler as a service, you need to define a server service object in that queue manager. This example uses a batch file and rules table for the DLQ Handler.

    Step:1 Configure Dead Letter Queue For Queue Manager:

    Define QLocal(DEAD.QUEUE) LIKE(SYSTEM.DEAD.LETTER.QUEUE)

    ALTER QMGR DEADQ(DEAD.QUEUE)

    ALTER QL(LOCAL-QUEUE-NAME) MAXDEPTH(5)

    Step:2 Create Batch File

    Contents of dlqhandler.bat

    cd "C:\Program Files\IBM\WebSphere MQ\bin"
    runmqdlq %1 %2 %3

    The rules table should be defined with some REASON and ACTION sequence and WAIT (YES), which means that the DLQ Handler waits indefinitely for further messages to arrive on the DLQ.

    Step:3 Rules table Content : File Name is-- RULETBL.RUL

    WAIT(YES) RETRYINT(20)
    REASON(*) ACTION(FWD/RETRY/DISCARD/IGNORE) FWDQ('QUEUENAME') FWDQM('QMGRNAME')

    Step:4 Define server service object for DLQ Handler

    DEFINE SERVICE(dlqhandler) +
    SERVTYPE(SERVER) +
    CONTROL(QMGR) +
    STARTCMD('C:\IBM\WebSphere\MQ\dlqhandler.bat') +
    DESCR('dead letter queue handler as server service') +
    STARTARG('DEADQ IBMQMR < C:\IBM\WebSphere\MQ\RULETBL.RUL') +
    STDOUT('C:\IBM\WebSphere\MQ\Log.txt') +
    STDERR('C:\IBM\WebSphere\MQ\Err.txt') +
    REPLACE

    You can set CONTROL to MANUAL, QMGR, or STARTONLY based on your requirements. The value of STARTCMD is the absolute path of the executable file dlqhandler.bat (on Windows).

    Step:5 Start Service:
    Start service(dlqhandler)

    Step:6 Display Service Status:
    Display SVStatus(dlqhandler)

    Step:7 Send 10 Messages From Source 

    5 messages are get stored on local queue
    5 messages are get stored on DEAD.QUEUE.
    Retrieve messages on local queue. dead letter handler will process messages to local queue. 

    Best Regards,
    MADHU K
    IBM MQ Certified Professional
    HYDERABAD
    +917893751171/+919964371404
    mailme.mq@gmail.com
    trainingontech.com
    http://www.ibmmqadmin-madhu.blogspot.in