|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Queue manager alias |
« View previous topic :: View next topic » |
Author |
Message
|
rdx |
Posted: Thu Aug 07, 2008 9:10 am Post subject: Queue manager alias |
|
|
Novice
Joined: 21 Dec 2004 Posts: 21
|
Hi All,
I want to use queue manager alias.
I have 2 queue managers QM1 ,QM2,
I want to send messages to a local queue on QM2 the name of the queue is localQM2
I created a remote queue QM1 (on queue manager QM1) with the remote queue name as blank, and remote queue manager name as QM2.
I created a transmission queue QM2 (on queue manager QM1) and have created the sender receiver channels from QM1 TO QM2.
I am using AMQSPUT localQM2 QM1
Getting the below error
MQOPEN ended with reason code 2085
unable to open queue for output
Sample AMQSPUT0 end.
Can any one tell me what I am doing wrong?
Thanks in advance |
|
Back to top |
|
 |
SAFraser |
Posted: Thu Aug 07, 2008 10:55 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
This is not the purpose of a queue manager alias. And you've not created one, you've created a remote queue without sufficient parameters to get to QM2. And you can't put to a queue definition that doesn't exist on QM1.
You might want to look at the Intercommunication manual to get an understanding of remote queue concepts. Then we can help you better. |
|
Back to top |
|
 |
rdx |
Posted: Thu Aug 07, 2008 11:00 am Post subject: |
|
|
Novice
Joined: 21 Dec 2004 Posts: 21
|
Thanks for the reply SAFraser.
I have done this after reading the intercommunication manual.
Below is from the intercommunication manual.
Queue manager alias definitions can be used to remap the queue manager name specified in an MQOPEN call. For example, an MQOPEN call specifies a queue name of THISQ and a queue manager name of YOURQM. At the local queue manager there is a queue manager alias definition like this:
DEFINE QREMOTE (YOURQM) RQMNAME(REALQM)
This shows that the real queue manager to be used, when an application puts messages to queue manager YOURQM, is REALQM. If the local queue manager is REALQM, it puts the messages to the queue THISQ, which is a local queue. If the local queue manager is not called REALQM, it routes the message to a transmission queue called REALQM. The queue manager changes the transmission header to say REALQM instead of YOURQM.
Thanks in advance |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Aug 07, 2008 11:09 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
In order for you to put a message to a queue on a remote qmgr, you need a QRemote definition like this:
DEF QR(remoteqname) +
RNAME(name of queue at remote qmgr) +
RQMNAME(name of qmgr that owns the remote queue) +
XMITQ(QM2)
The remoteqname is the name that your application will use in the amqsput application. This name resolves to the transmission queue.
A queue manager alias is used to resolve a QUEUE MANAGER name. You do not need one in your scenario. A queue manager alias makes use of a QR definition without the RNAME attribute. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
rdx |
Posted: Thu Aug 07, 2008 11:51 am Post subject: |
|
|
Novice
Joined: 21 Dec 2004 Posts: 21
|
Hi Bruce ,
I can put messages from QM1 to QM2 by creating normal TRANSMIT queue, remote queue, sender--receiver channels that works fine ,I dont have any issues with it.I want to test the queue manager alias thing I have done this according to the intercommunication manual
SAFraser.
I have done this after reading the intercommunication manual.
Below is from the intercommunication manual.
Queue manager alias definitions can be used to remap the queue manager name specified in an MQOPEN call. For example, an MQOPEN call specifies a queue name of THISQ and a queue manager name of YOURQM. At the local queue manager there is a queue manager alias definition like this:
DEFINE QREMOTE (YOURQM) RQMNAME(REALQM)
This shows that the real queue manager to be used, when an application puts messages to queue manager YOURQM, is REALQM. If the local queue manager is REALQM, it puts the messages to the queue THISQ, which is a local queue. If the local queue manager is not called REALQM, it routes the message to a transmission queue called REALQM. The queue manager changes the transmission header to say REALQM instead of YOURQM.
Thanks in advance |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Aug 07, 2008 12:40 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
I want to test the queue manager alias thing I have done... |
What is it that you want the queue manager alias to do for you?
Queue manager aliases are used to resolve queue MANAGER names, NOT queue names.
An example: a message arrives at a downstream qmgr AND the RQMNAME attribute on the QR at the sending end specified an invalid qmgr name; then a queue manager alias could correctly resolve the invalid name.
So, if your QRemote(remotename) definition (the one that you specify when you run amqsput remotename) specifies in the RQMNAME(badqmgrname), AND the message arrives at the downstram qmgr (goodqmgrname); then a qmgr alias in the receiving qmgr would look like this:
DEF QR(badqmgrname) RQMNAME(goodqmgrname)
without this definition, the message would end up in the dead-letter queue.
Again, what is it you want to accomplish with a queue manager alias?
(Queue Manager Alias is an advanced subject.) _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
SAFraser |
Posted: Thu Aug 07, 2008 12:46 pm Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
rdx, The queue manager alias does not get created on QM1, it gets created on QM2. That might be where the documentation was a bit confusing for you. |
|
Back to top |
|
 |
rdx |
Posted: Thu Aug 07, 2008 12:59 pm Post subject: |
|
|
Novice
Joined: 21 Dec 2004 Posts: 21
|
Hi Bruce ,
I want to use AMQSPUT localQM2 QM1 and see that the message reaches localQM2 on queue manager QM2.
The application will be putting messages to QM1 and I want to route the message to QM2 by using queue manage alias .
The application was putting messages to queue (localQM2) on queue manager QM1(localQM2 queue in now deleted from QM1 and is created on QM2). Now we don’t want to change the application and see that the messages go to localQM2 on queue manager QM2.
Is the above possible by using queue manager alias.
Thanks in advance |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Aug 07, 2008 1:53 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
I want to route the message to QM2 by using queue manage alias |
You do not need to modify the MQPUTting application to change the location of the destination queue.
If you want to move the destination queue from your local (where the application runs) qmgr to a queue on a remote qmgr, then you need only change the definition of the queue on the sending qmgr from QLocal to QRemote definition. The application does not need to change.
From your posts, it appears that you are new to MQ, and are struggling with the basics - like what is a local queue and what is a remote queue. There is an IBM Redbook "MQ V6 Fundamentals" that should be the starting place for your MQ journey.
Alternatively, take a system admin class - like IBMs WM15x System Administration - WM151 is for Windows, WM152 for UNIX, WM155 for SUN. Or, MQ021 for z/OS. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
exerk |
Posted: Thu Aug 07, 2008 11:45 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
bruce2359 wrote: |
...There is an IBM Redbook "MQ V6 Fundamentals" that should be the starting place for your MQ journey... |
Also this one WMQ Primer, which is still the best 'starter' resource available. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
SAFraser |
Posted: Fri Aug 08, 2008 3:57 am Post subject: |
|
|
 Shaman
Joined: 22 Oct 2003 Posts: 742 Location: Austin, Texas, USA
|
And to add to bruce's post, you do not need a queue manager alias which serves an entirely different purpose. You just need a remote queue on QM1, pointing to the local queue on QM2.
Don't read about queue manager alias for this. The Primer exerk suggests has some good diagrams that may help with the remote queue concept. |
|
Back to top |
|
 |
pshan81 |
Posted: Fri Aug 08, 2008 4:39 am Post subject: |
|
|
Acolyte
Joined: 24 May 2005 Posts: 72
|
I am also exploring queue manager alias.I have 3 queue managers QM1,QM2 and QM3.
QM1 has a sender channel to QM2 (QM1.QM2) and an XMITQ QM2 & the below definition
define qremote(QM3) rqmname(QM2) xmitq(QM2)
QM2 has a receiver channel QM1.QM2,a sender channel QM2.QM3,an XMITQ QM3.TRAN and the below definition
define qremote(QM3) rqmname(QM3) rname(TEST) xmitq(QM3.TRAN)
QM3 has a receiver channel QM2.QM3 and a local queue TEST
I am putting the message in qmgr alias QM3 by connecting the qmgr QM1 using my own java application.The message successfully reached TEST queue in QM3.Is the setup & logic of queue manager alias correct??
Thanks in advance |
|
Back to top |
|
 |
exerk |
Posted: Fri Aug 08, 2008 4:48 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
The fact that the messages arrive on the correct queue in QM3 provides your answer  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
rdx |
Posted: Fri Aug 08, 2008 7:04 am Post subject: |
|
|
Novice
Joined: 21 Dec 2004 Posts: 21
|
Hi Bruce ,
I know that we can create new queue definitions and make it work. I mean by creating appropriate remote queues, transmit queues , channels.
I was trying to explore the concept of queue manager alias. When I was reading the intercommunication manual it mentioned
Queue manager alias definitions apply when an application that opens a queue to put a message, specifies the queue name and the queue manager name.
Queue manager alias definitions can be used to remap the queue manager name specified in an MQOPEN call. For example, an MQOPEN call specifies a queue name of THISQ and a queue manager name of YOURQM. At the local queue manager there is a queue manager alias definition like this:
DEFINE QREMOTE (YOURQM) RQMNAME(REALQM)This shows that the real queue manager to be used, when an application puts messages to queue manager YOURQM, is REALQM. If the local queue manager is REALQM, it puts the messages to the queue THISQ, which is a local queue. If the local queue manager is not called REALQM, it routes the message to a transmission queue called REALQM. The queue manager changes the transmission header to say REALQM instead of YOURQM.
Thus i created QM1(YOURQM) QM2(REALQM) and wanted to send messages from QM1 to QM2.
In the mqopen call as mentioned in the manual i am using THISQ(localQM2) and queue manager QM1(YOURQM). and it says in the manual that it uses the trnsmission queue thus i created the transmission queue QM2(TRANSMIT QUEUE REALQM MENTIONED IN MANUAL). and created the apropriate channels(sender receiver).
I guess i am doing exactly what is mentioned in the manual ( i amay be wrong).
Can you please correct me what i am doing different from what is mentioned in the manual. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Aug 08, 2008 12:05 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Your post is based on the application explicitly (incorrectly and unnecessarily) specifying at MQOPEN (or Java equivalent) the queue name AND queue manager name - in your scenario, using the wrong qmgr name.
An application program usually opens a queue name for which there is a QRemote queue definition that specifies the RNAME (the name of the queue at the destination end of the channel) and the RQMNAME (the qmgr at the destination end of the channel). This queue definition usually specifies explicitly the name of the transmission queue where the message is to be MQPUT.
For a message that must be sent on a channel, the qmgr builds a transmission queue header that contains the queue name and qmgr name from the definition that the application opened. Again, the usual source of these two names is usually the QRemote definition that the application mqoopens.
The explicit naming of the qmgr at MQOPEN causes the local qmgr to NOT perform name resolution. The assumption is that the queue name is what the application specified AND that there will be a transmission queue by the same name as the queue manager name; OR, in your case) that a queue manager alias will resolve the wrong transmission queue name to the correct transmission queue name.
Your qmgr alias resolved the wrong qmgr name that the application specified.
Please note well that a qmgr alias definition uses a QRemote definition object without the RNAME attribute; but it is not a queue remote queue definition. Thus, when you said that your application put a message on a qmgr alias, it did not.
Please read the Intercommunications manual from the beginning to understand the QRemote queue definition and its attributes, the channel definition, the transmision queue definition, the transmission queue header, and how the message channel agents move messages down the message channel.
Then, when you have grasped these fundamental concepts, the purpose and use of a qmgr alias may make some sense. Again, a qmgr alias is an advanced topic.
Briefly, very briefly, a qmgr alias can
. resolve a transmission queue name if none is specified OR is incorrectly specified on the the local QRemote queue definition;
. resolve the qmgr name (in the transmission queue header) on a downstream qmgr - if the message is realy destined for that qmgr;
. cause the downstream MCA to put the message into another transmission queue if the message is destined for another qmgr further down the network. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|
|
 |
Goto page 1, 2 Next |
Page 1 of 2 |
|
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
|
|
|
|