Configuring WebSphere MQ for UDP

You configure WebSphere MQ to use UDP using MQSC commands.

Make sure there is a listener started for UDP by issuing the following command:

runmqlsr -m QMgrName -t UDP

Notes:

  1. You cannot start a UDP listener on AIX using the MQSC command START LISTENER.

  2. Using the runmqlsr command means that you must not add entries in the /etc/services and /etc/inetd.conf files for UDP on WebSphere MQ for AIX.

Examples of MQSC command files

The following figures show MQSC command files, supplied with WebSphere MQ, with the channel transport type (the TRPTYPE parameter) set to UDP:

Both these files are supplied in directory \mqw\samples on WebSphere MQ for Windows. They define the queues and channels you use if you follow the procedure for setting up and verifying two queue managers.

Figure 42. The supplied file EARTH.TST

* Define a local transmission queue - messages will be put here
* before being sent to the remote queue manager.
DEFINE QLOCAL('SAMPLE.EARTH.XMIT') REPLACE +
       DESCR('Local transmission queue')  +
       USAGE(XMITQ)
 
* Define the remote queue.
* The sample application should put messages on this queue.
DEFINE QREMOTE('SAMPLE.EARTH.REMOTE') REPLACE  +
       DESCR('Remote queue defined on EARTH') +
       DEFPSIST(YES) +
* This is the name of the local queue on the remote machine
       RNAME('SAMPLE.MOON.LOCAL') +
* This is the name of the queue manager on the remote machine
       RQMNAME('MOON') +
* This is the name local transmission queue to be used
       XMITQ('SAMPLE.EARTH.XMIT')
 
* Define the channel that will remove messages from the transmission
* queue SAMPLE.EARTH.XMIT and send them to the machine specified
* by CONNAME.
*
* Change CONNAME to the IP name of the machine where
* the remote queue manager is running.
*
DEFINE CHANNEL ('EARTH.TO.MOON')  CHLTYPE(SDR) TRPTYPE(UDP) +
       XMITQ('SAMPLE.EARTH.XMIT') +
       CONNAME('MOON IP machine name') +
       DESCR('Sender channel for messages to queue manager MOON') +
       REPLACE
 
* Define the channel that will accept messages from the remote
* queue manager on the machine specified by CONNAME.
*
* Change CONNAME to the IP name of the machine where
* the remote queue manager is running.
*
DEFINE CHANNEL ('MOON.TO.EARTH') CHLTYPE(RQSTR) TRPTYPE(UDP) +
       CONNAME('MOON IP machine name') +
       DESCR('Requester channel for messages from queue manager MOON') +
       REPLACE
 
* Define the local queue where the remote machine will place
* its messages.
* The sample application should get messages from this queue.
DEFINE QLOCAL('SAMPLE.EARTH.LOCAL') REPLACE +
       DESCR('Local queue') +
       DEFPSIST(YES)  +
       SHARE

Figure 43. The supplied file MOON.TST

* Define a local transmission queue - messages will be put here
* before being sent to the remote queue manager
DEFINE QLOCAL('SAMPLE.MOON.XMIT') REPLACE +
       DESCR('Local transmission queue')  +
       USAGE(XMITQ)
 
 
* Define the remote queue.
* The sample application should put messages on this queue
DEFINE QREMOTE('SAMPLE.MOON.REMOTE') REPLACE  +
       DESCR('Remote queue defined on MOON') +
       DEFPSIST(YES) +
* This is the name of the local queue on the remote machine
       RNAME('SAMPLE.EARTH.LOCAL') +
* This is the name of the queue manager on the remote machine
       RQMNAME('EARTH') +
* This is the name local transmission queue to be used
       XMITQ('SAMPLE.MOON.XMIT')
 
 
* Define the channel that will remove messages from the transmission
* queue SAMPLE.MOON.XMIT and send them to the remote queue
* manager.
DEFINE CHANNEL ('MOON.TO.EARTH') CHLTYPE(SVR) TRPTYPE(UDP) +
       XMITQ('SAMPLE.MOON.XMIT') +
       DESCR('Server channel for messages to queue manager EARTH') +
       REPLACE
 
 
* Define the channel that will accept messages from the remote
* queue manager.
DEFINE CHANNEL ('EARTH.TO.MOON')  CHLTYPE(RCVR) TRPTYPE(UDP) +
       DESCR('Receiver channel for messages from queue manager EARTH') +
       REPLACE
 
 
* Define the local queue where the remote machine will place
* its messages.
* The sample application should get messages from this queue
DEFINE QLOCAL('SAMPLE.MOON.LOCAL') REPLACE +
       DESCR('Local queue') +
       DEFPSIST(YES)  +
       SHARE


© IBM Corporation 1994, 2002. All Rights Reserved