ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Multi-hopping problems

Post new topic  Reply to topic
 Multi-hopping problems « View previous topic :: View next topic » 
Author Message
softtechie
PostPosted: Mon Jun 12, 2006 7:23 pm    Post subject: Multi-hopping problems Reply with quote

Newbie

Joined: 10 Jun 2006
Posts: 3

Hi,
I'm new to MQ design environment and trying to learn it by practice. I find multi-hopping little confusing
I'm trying following example,

runmqsc QM1
DEFINE QLOCAL('QM2') USAGE(XMITQ)
DEFINE QREMOTE('Q3') RNAME('') RQMNAME(QM3) XMITQ('QM2')
DEFINE CHL('to.QM2') CHLTYPE(SDR) CONNAME('localhost(9011)') XMITQ('QM2')
ALTER QLOCAL('QM2') TRIGGER TRIGTYPE(FIRST) TRIGDATA('to.QM2') INITQ('SYSTEM.CHANNEL.INITQ')



runmqsc QM2
DEFINE QLOCAL('QM3') USAGE(XMITQ)
DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(9011) CONTROL(QMGR) DESCR('TCP/IP Listener')
START LISTENER('LISTENER.TCP')
DEFINE CHL('to.QM3') CHLTYPE(SDR) CONNAME('localhost(9012)') XMITQ('QM3')
DEFINE CHL('to.QM2') CHLTYPE(RCVR)
ALTER QLOCAL('QM3') TRIGGER TRIGTYPE(FIRST) TRIGDATA('to.QM3') INITQ('SYSTEM.CHANNEL.INITQ')

runmqsc QM3
DEFINE QLOCAL('Q3')
DEFINE LISTENER('LISTENER.TCP') TRPTYPE(TCP) PORT(9012) CONTROL(QMGR) DESCR('TCP/IP Listener')
START LISTENER('LISTENER.TCP')
DEFINE CHL('to.QM3') CHLTYPE(RCVR)



C:\>amqsput Q3 QM1
Sample AMQSPUT0 start
target queue is Q3
MQOPEN ended with reason code 2184
unable to open queue for output
Sample AMQSPUT0 end


However, If I change the QManager alias definition to include the Qname also, as shown below
DEFINE QREMOTE('Q3') RNAME('Q3') RQMNAME(QM3) XMITQ('QM2')
it works as
C:\>amqsput Q3 QM1
Sample AMQSPUT0 start
target queue is Q3
Trial messages after changing QMGR alias

Sample AMQSPUT0 end


I read that for a QMGR alias, it must have RNAME as blank, but I'm unable to create a multi-hopping example with such definition,
Can anyone in this group help me with this.

Regards
Aqeel..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jun 12, 2006 7:46 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Create a remote queue on QM2 that uses the xmitq to QM1 and sends a message to a queue on QM3.

define qr(qm3_test) rname(myqm3q) rqmname(qm3) xmitq(qm1).

Upon arriving in QM1 the algorithm will send it to QM2 and then to QM3.

Of course you need the channel pair from QM2 to QM1.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Mon Jun 12, 2006 7:50 pm    Post subject: Re: Multi-hopping problems Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

This is a complicated subject but here goes.

softtechie wrote:
DEFINE QREMOTE('Q3') RNAME('') RQMNAME(QM3) XMITQ('QM2')

That is a QMgr Alias defintion.

softtechie wrote:
DEFINE QREMOTE('Q3') RNAME('Q3') RQMNAME(QM3) XMITQ('QM2')

That is a remote queue definition

softtechie wrote:
C:\>amqsput Q3 QM1

This program will use a queue called 'Q3' of 'QM1' queue manager. Hence, it will use / wants a remote queue definition.

If you really want to use a QMgr Alias definition then MQSC definitions for QM1 needs to be:
Quote:
[1] runmqsc QM1
[2] DEFINE QLOCAL('QM2') USAGE(XMITQ) TRIGGER TRIGTYPE(FIRST) TRIGDATA('to.QM2') INITQ('SYSTEM.CHANNEL.INITQ')
[3] DEFINE QREMOTE('Q3') RNAME('Q3') RQMNAME('QM3') XMITQ('QM3')
[4] DEFINE QREMOTE('QM3') RNAME('') RQMNAME('QM3') XMITQ('QM2')
[5] DEFINE CHL('to.QM2') CHLTYPE(SDR) CONNAME('localhost(9011)') XMITQ('QM2')


Line [2] is the transmission queue.
Line [3] is the remote queue defintion for Q3.
Line [4] is the 'QM3' QMgr Alias definition.

Hope that helps.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
sandiksk
PostPosted: Tue Jun 13, 2006 6:51 am    Post subject: Reply with quote

Centurion

Joined: 08 Jun 2005
Posts: 133

Or you could use the RFHUtility. With the amqsput you cant use the QMalias
http://www.mqseries.net/phpBB2/viewtopic.php?t=24554&highlight=


I just tried it and it did work. It should work with your initial setting.
Back to top
View user's profile Send private message
softtechie
PostPosted: Tue Jun 13, 2006 4:27 pm    Post subject: Reply with quote

Newbie

Joined: 10 Jun 2006
Posts: 3

Hi Roger,
Thanks a lot for your reply, however as per your solution, is it necessary to have both remote queue definition as well as queue manager alia definition on QM1, I was reading from intercommunication, and it said only Queue Mgr alias is required, Can you please put some light on this,

Further Qremote definition you have given uses XMITQ'QM3' , do I need to define one more XMITQ on QM1?
[3] DEFINE QREMOTE('Q3') RNAME('Q3') RQMNAME('QM3') XMITQ('QM3')

Your response is really appreciated.
Regards
Aqeel..[/quote]
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jun 13, 2006 6:35 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you tried my exemple? What was the result?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Tue Jun 13, 2006 8:21 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

softtechie wrote:
I was reading from intercommunication, and it said only Queue Mgr alias is required, Can you please put some light on this

The answer really depends on how your MQ environment is setup. For hub & spoke, I would use a QMgr Alias but for peer-to-peer, I would use the remote queue definition.

But amqsput was NOT designed to test multi-hop messaging. Hence, you will need a different program (one that issues the MQOPEN correctly).

softtechie wrote:
Further Qremote definition you have given uses XMITQ'QM3' , do I need to define one more XMITQ on QM1?
[3] DEFINE QREMOTE('Q3') RNAME('Q3') RQMNAME('QM3') XMITQ('QM3')

Yes, it is a typo - it should be:
Quote:
[1] runmqsc QM1
[2] DEFINE QLOCAL('QM2') USAGE(XMITQ) TRIGGER TRIGTYPE(FIRST) TRIGDATA('to.QM2') INITQ('SYSTEM.CHANNEL.INITQ')
[3] DEFINE QREMOTE('Q3') RNAME('Q3') RQMNAME('QM3') XMITQ('QM2')
[4] DEFINE QREMOTE('QM3') RNAME('') RQMNAME('QM3') XMITQ('QM2')
[5] DEFINE CHL('to.QM2') CHLTYPE(SDR) CONNAME('localhost(9011)') XMITQ('QM2')


Hope that helps.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
sandiksk
PostPosted: Wed Jun 14, 2006 5:19 am    Post subject: Reply with quote

Centurion

Joined: 08 Jun 2005
Posts: 133

softtechie wrote
Code:
  I was reading from intercommunication, and it said only Queue Mgr alias is required, Can you please put some light on this 


QueueManager Alias works when you can specify the local queue of the remote queumanager in your application. With AMQSPUT there is no such option where u can specify the rname(local queue of remote queue manager). As i said before try doing this with the RFHUTILITY. I tried it with the rfhutility and it did work. You dont need another qremote definition.
Back to top
View user's profile Send private message
JoePanjang
PostPosted: Wed Jun 14, 2006 11:27 am    Post subject: Reply with quote

Voyager

Joined: 10 Jul 2002
Posts: 88
Location: Dengkil MALAYSIA

Question on top of what being explained -

how to define another mq object for the same multi hopping using the same route as mentioned ie QM1 - QM2 - QM3 by using difference queue. Since the xmitq always referring to the QMGR name, how to make use of this xmitq again for the next definition w/o sharing the chl etc.

tq
_________________
Every good deed is charity...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jun 14, 2006 3:34 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

JoePanjang wrote:
Question on top of what being explained -

how to define another mq object for the same multi hopping using the same route as mentioned ie QM1 - QM2 - QM3 by using difference queue. Since the xmitq always referring to the QMGR name, how to make use of this xmitq again for the next definition w/o sharing the chl etc.

tq

Look at my exemple.
3 QMGRS A,B,C
Default path through aliases from A->C via B.
On B use a remote queue specifying the xmitq A to put message to A for Qmgr C
Code:
def qr(myc) rqmname(c) rname(local.c.queue) xmitq(a)


Now if you stop/start the channels you can observe the multihop in each of the xmit queues on the way.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Multi-hopping problems
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.