On the receiving queue manager QM_APPLE, create the receiver end of the channel:
In the Navigator view, expand the
queue manager QM_APPLE that you created earlier.
Right-click the Channels folder, then click New > Receiver Channel.
The New Receiver Channel wizard opens.
In the Name field, type QM_ORANGE.QM_APPLE
Click Finish.
You have now created the receiver channel on the receiving machine.
On the sending queue manager QM_ORANGE, create the sender end of the channel:
Expand the queue manager QM_ORANGE that you created earlier.
Right-click the Channels folder, then click New > Sender Channel.
The New Sender Channel wizard opens.
In the Name field, type QM_ORANGE.QM_APPLE, then click Next.
In the Connection name field,
type the computer name or IP address of the receiving machine (you
should already have obtained this with your system administrator's
help).
If the default port number 1414
was not used when creating QM_APPLE, the Connection name field entry
should be of the format:
con-name(port)
Where con-name is the computer name or IP address of the receiving
machine, and port is the port number used when
the receiving queue manager was set up.
You
have now created the sender channel on the sending machine.
Note: You do not have to start the receiver channel because it started
automatically when you set up the sender channel (when you set up
the sender channel, you specified the receiver channel's IP address).
Results
You have now created a receiver channel QM_ORANGE.QM_APPLE,
on the receiving queue manager QM_APPLE, and a sender channel QM_ORANGE.QM_APPLE,
on the sending queue manager QM_ORANGE. You have also started the
sender channel, which automatically started the receiver channel.
Creating the message channel using MQSC
Procedure
Open a command prompt on the receiving machine and
follow these steps:
Start MQSC by typing the command:
runmqsc
A message tells you that
an MQSC session has started.
Define a receiving channel by typing the following command:
A message tells you when the channel has been created.
Open a new command window and
check which ports are free. Enter the following command:
netstat -an
This
shows you a list of running processes. Check the port number of each
of the processes to see if port 1414 is in use; you can find this
by looking in the Local Address column. The information is given in
the form ip_address:port_being _used.
If port 1414 is not in
use, use 1414 as the port number for your listener and sender channel
later in the verification. If it is in use, select an alternative
port that is not in use; for example 1415 if this is not being used
by another process.
Verification requires you to start the
default IBMWebSphere MQ listener.
By default, the listener will listen on port 1414. If you found that
port 1414 was free in step c, no action is required and you can proceed to step e. If you must use a port other than
1414, 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 step 2b of
this procedure.
In the MQSC window, start the
default IBMWebSphere MQ listener
by entering the following command:
start listener(system.default.listener.tcp)
Stop MQSC by typing:
end
Some messages are displayed followed by the
command prompt.
Open a command prompt on the sending machine and
follow these steps:
Start MQSC by typing the command:
runmqsc
A message
tells you that an MQSC session has started.
Define a sender channel by typing the following
command:
The value con-name is the TCP/IP
address of the receiver workstation. The value port is the port on which the listener is running on the receiver machine,
the default value is 1414.
Start the channel by typing the following command:
start channel (QM_ORANGE.QM_APPLE)
Stop MQSC by typing:
end
Some messages are displayed followed by the
command prompt.
Results
You have now created all the IBMWebSphere MQ objects required for messages
to be sent from the sending queue manager QM_ORANGE to the queue Q1
on the receiving queue manager QM_APPLE. The next task is to send
a test message.