Websphere MQ Install Verification

 

 

Server Setup

  1. Create a default queue manager...
    crtmqm -q qmgr1
    

  2. Start the queue manager...
    strmqm
    

  3. Start WebSphere MQ Script (MQSC) Commands...
    runmqsc
    

    MQSC does not provide a prompt, but should respond with the message:

    Starting MQSeries Commands
    

  4. Create a local queue...
    DEFINE QLOCAL(QUEUE1)
    

  5. Create a server-connection channel...
    DEFINE CHANNEL(CHANNEL1) 
           CHLTYPE(SVRCONN) 
           TRPTYPE(TCP) 
           MCAUSER(' ')
    

  6. Stop MQSC by typing "end" then pressing Enter.

  7. Start TCP/IP channels...
    runmqlsr -t tcp -m qmgr1

 

Client Verification

When an WebSphere MQ application is run on the WebSphere MQ client, it requires the name of the MQI channel, the communication type, and the address of the server to be used. You provide this by defining a client-connection channel. The name used must be same as the name used for the server-connection channel defined on the server.

Before starting, ping hostname to confirm the server is reachable.

Create a client-connection channel by setting the MQSERVER environment variable.

export MQSERVER=CHANNEL1/TCP/'server-address(port)'

...or...

export MQSERVER=CHANNEL1/TCP/server-address\(port\)

If you do not give a port number, WebSphere MQ uses the one specified in the QM.INI file. If no value is specified in the QM.INI file, the port number identified in the TCP/IP services file for the service name MQSeries. If this entry in the services file does not exist, a default value of 1414 is used.

 

amqsputc

You can use the amqsputc client program to put a message on the queue.

PATH=$PATH:/opt/mqm/samp/bin:/opt/mqm/bin
MQSERVER=CHANNELNAME/TCP/'HOST_NAME(PORT)'
export MQSERVER
amqsputc queue_name queue_mgr_name

The following message is should be displayed:

Sample AMQSPUT0 start
target qname is queue_name

Type a sample message text and then press Enter twice. The following message is displayed...

Sample AMQSPUT0 end

...which means the message is now on the queue.

Note that amqsputc starts and stops the channel between the client and the server.

To get a message from the queue use amqsgetc:

PATH=$PATH:/opt/mqm/samp/bin:/opt/mqm/bin
amqsgetc QUEUE1 qmgr

To stop the queue manager...

endmqm qmgr1 /blockquote>

To delete the queue manager type:

dltmqm qmgr1

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.