Use the following steps to set up the receiver:
- Create a default queue manager called QMB. At the command prompt, enter the following command:
crtmqm -q QMB
Messages
tell you that the queue manager is created, and that the default WebSphere® MQ objects
are created.
- Start the queue manager. Enter the following command:
strmqm
A
message tells you when the queue manager starts.
- Open a new command prompt window and enable MQSC commands. Enter the following command:
runmqsc
The message Starting
WebSphere MQ Commands is displayed when MQSC starts. MQSC has no
command prompt.
- In the MQSC window, define a local queue called APPLE.QUEUE. Enter the following command:
define qlocal(apple.queue)
The
message WebSphere MQ queue created is displayed when the
queue is created.
- In the MQSC window, create a receiver channel. Enter
the following command:
define channel(QMA.QMB) chltype(rcvr) trptype(tcp)
- Verification requires you to start the default WebSphere MQ listener
on the port number that you specified when setting up the sender workstation
in step 7. By default the listener will listen on port 1414. If you did not change
the default port whilst defining the sender channel on the sender workstation,
no action is required, proceed to the next step. If you specified a port other
than 1414 whilst setting up the sender workstation, alter the definition of
the SYSTEM.DEFAULT.LISTENER.TCP. For example, to use port 1415, enter the
following command in the MQSC window:
alter listener(system.default.listener.tcp) trptype(tcp)
port(port_number)
Where:- port_number
- is the number of the port the listener should run on. This must be the
same as the number used when defining your sender channel.
- In the MQSC window, start the default WebSphere MQ listener
by entering the following command:
start listener(system.default.listener.tcp)
- In the MQSC window, verify the listener process has started by
executing the command:
display lsstatus(*)
- In the MQSC window, stop MQSC. Enter the following command:
end
You have now defined the following objects:
- A default queue manager called QMB
- A queue called APPLE.QUEUE
- A receiver channel called QMA.QMB