Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Initial configuration of Queues...

Status
Not open for further replies.

laf23

Technical User
Apr 25, 2001
1
US
I am new to IBM MQ and have just installed. I am trying to create two queues that send to each other (simple i know). I cannot use the default configuration as my IP address is DHCP assigned.

What I would like is a simple step by step guide to creating two queues on a single machine that when you send a message to the first queue it passes it on to the next.

This is a simple test to get me started.

Any help greatly appreciated......
 
Laf23:
This is an example i found in IBM FAQ.

Frequently Asked Questions

FAQ help
General help
Text search syntax



Can you have two queue managers on a Windows NT machine talk with each other, and if so, how?
A: Yes.

This example shows how to set up two queue mangers on the same Windows NT box and have them talk with each other.

The secret is in the port.

*create your default queue manager.

crtmqm -q QMGR1
*create your second queue manager.
crtmqm QMGR2
*create your default queue manager definitions.
*change hostname to your hostname or IP address.
*don't forget the single quotes.

* begin script.one

def channel(QMGR1.TO.QMGR2) chltype(SDR) +
trptype(tcp) conname('hostname(1415)') +
xmitq(QMGR2) +
replace descr('QMGR1 to QMGR2 sender')
def channel(QMGR2.TO.QMGR1) chltype(rcvr) +
trptype(tcp) replace
def qlocal(QMGR2) like(system.default.local.queue) +
replace share usage(xmitq)
def qremote('to.QMGR2') +
like(system.default.remote.queue) xmitq(QMGR2) +
replace rname('from.QMGR1') rqmname(QMGR2)
def qlocal('from.QMGR2') replace
end


* end script one

*create your default queue manager definitions.

runmqsc < script.one
*create the definitions for your second queue manager.
*change the hostname to your hostname.
* begin script.two

def channel(QMGR2.TO.QMGR1) chltype(SDR) +
trptype(tcp) conname(hostname) xmitq(QMGR1) +
replace descr('QMGR2 to QMGR1 sender')
def channel(QMGR1.TO.QMGR2) chltype(rcvr) +
trptype(tcp) replace
def qlocal(QMGR1) like(system.default.local.queue) +
replace share usage(xmitq)
def qremote('to.QMGR1') +
like(system.default.remote.queue) xmitq(QMGR1) +
replace rname('from.QMGR2') rqmname(QMGR1)
def qlocal('from.QMGR1')
end


* end script.two

*create the definitions for your second queue manager.

runmqsc < script.two QMGR2
*check your MQSeries system administration for more information.
*start a listener for QMGR1 default queue manager default port 1414.

runmqlsr -t tcp
*start a listener for QMGR2 selected port 1415.
runmqlsr -t tcp -p 1415 -m QMGR2
*start the channel from QMGR1 to QMGR2.
runmqchl -c QMGR1.TO.QMGR2
*start the channel from QMGR2 to QMGR1.
runmqchl -c QMGR2.TO.QMGR1 -m QMGR2
*send a message to QMGR2 from QMGR1.
e:\mqm\tools\samples\c\bin\amqsput to.QMGR2

Message to QMGR2
*blank ends program.
*send a message to QMGR1 from QMGR2.

e:\mqm\tools\samples\c\bin\amqsput to.QMGR1 QMGR2

Message to QMGR1
*blank ends program.
*get the message on QMGR1 sent by QMGR2.

e:\mqm\tools\samples\c\bin\amqsget from.QMGR2

Message to QMGR1
no more messages
program ends
*get the message on QMGR2 sent by QMGR1.
e:\mqm\tools\samples\c\bin\amqsget from.QMGR1 QMGR2

Message to QMGR2
no more messages
program ends

Regards

Eduardo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top