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 » Clustering » Putting from Outside the Cluster using Queue Manager Alias

Post new topic  Reply to topic
 Putting from Outside the Cluster using Queue Manager Alias « View previous topic :: View next topic » 
Author Message
damianharvey
PostPosted: Thu Sep 14, 2006 8:41 am    Post subject: Putting from Outside the Cluster using Queue Manager Alias Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

I've just implemented IBM's suggestion for putting a message into a Cluster from a Queue Manager outside of the Cluster. This method (which you can find here: http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzah.doc/csqzah0732.htm) relies on the use of a Queue Manager Alias that points to nothing.

Code:
DEFINE QREMOTE(ANY.NAME.AT.ALL) RNAME(' ') RQMNAME(' ')


This works fine, however I'd like to know if anyone has an explanation of *why* it works.

As far as I can see, setting the RQMNAME in the Remote Queue definition on the Queue Manager outside of the Cluster to this value causes the Gateway Queue Manager inside the Cluster to not look at other Queue Managers for the Queue and instead search it's known Clusters.

Why doesn't MQ search it's known clusters before having to rely on something like this?

Cheers,

Damian.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Sep 14, 2006 9:31 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

damianharvey,

the definiton DEFINE QREMOTE(ANY.NAME.AT.ALL) RNAME(' ') RQMNAME(' ') is not only a QMgr alias, it is a cluster alias. This means, you advise the QMgr, where this cluster alias is defined, to look somewhere in the cluster for the queue which is stored in the Xmit header of the message. The target QMgr in the Xmit header of the message must be the name of your cluster alias (ANY.NAME.AT.ALL in your sample.

So on the sending QMgr you need something like:

DEFINE QREMOTE(remote_queue_name) RNAME(target_queue) RQMNAME(ANY.NAME.AT.ALL)
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Sep 14, 2006 2:20 pm    Post subject: Reply with quote

Grand High Poobah

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

HubertKleinmanns wrote:
damianharvey,

the definiton DEFINE QREMOTE(ANY.NAME.AT.ALL) RNAME(' ') RQMNAME(' ') is not only a QMgr alias, it is a cluster alias. This means, you advise the QMgr, where this cluster alias is defined, to look somewhere in the cluster for the queue which is stored in the Xmit header of the message. The target QMgr in the Xmit header of the message must be the name of your cluster alias (ANY.NAME.AT.ALL in your sample.

So on the sending QMgr you need something like:

DEFINE QREMOTE(remote_queue_name) RNAME(target_queue) RQMNAME(ANY.NAME.AT.ALL)

and preferably add the XMITQ(clustergatewayqmgr):
DEFINE QREMOTE(remote_queue_name) RNAME(target_queue) RQMNAME(ANY.NAME.AT.ALL) XMITQ(clustergatewayqmgr)
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Sep 14, 2006 3:24 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
and preferably add the XMITQ(clustergatewayqmgr):
DEFINE QREMOTE(remote_queue_name) RNAME(target_queue) RQMNAME(ANY.NAME.AT.ALL) XMITQ(clustergatewayqmgr)


That's not what you said you normally do with cluster aliases... You said you normally leave the XMITQ blank.

The real answer why this works is that it removes the queue manager name from the MQ Object Descriptor, which causes the putting process (or, sometimes, the MCA) to re-resolve a queue manager name based on the queue name.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Sep 14, 2006 3:47 pm    Post subject: Reply with quote

Grand High Poobah

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

jefflowrey wrote:
fjb_saper wrote:
and preferably add the XMITQ(clustergatewayqmgr):
DEFINE QREMOTE(remote_queue_name) RNAME(target_queue) RQMNAME(ANY.NAME.AT.ALL) XMITQ(clustergatewayqmgr)


That's not what you said you normally do with cluster aliases... You said you normally leave the XMITQ blank.

The real answer why this works is that it removes the queue manager name from the MQ Object Descriptor, which causes the putting process (or, sometimes, the MCA) to re-resolve a queue manager name based on the queue name.

Yes I do leave the xmitq blank but then I don't create a remote queue either.... We are talking about creating a remote queue to put messages to the cluster from OUTSIDE the cluster. So if you define a remote queue, like HubertKleinmanns showed, I would expect you to define it outside the cluster thus the need for a way to get it to the cluster (xmitq). Once inside the cluster the cluster alias will resolve it. Note that the RQMNAME was not blank on this alias definition and as such it would be used for routing not for cluster resolution.

The only way I would think to resort to the extremes of defining a remote queue to a cluster queue within the cluster is if you need to put a message manually to a qmgr where the queue is already present (trying to avoid the 5.3 behavior and load balance) but even then it would make sense to route the message through the cluster gateway just to be sure.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
HubertKleinmanns
PostPosted: Tue Sep 19, 2006 8:27 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

fjb_saper wrote:
...
Yes I do leave the xmitq blank but then I don't create a remote queue either.... We are talking about creating a remote queue to put messages to the cluster from OUTSIDE the cluster. So if you define a remote queue, like HubertKleinmanns showed, I would expect you to define it outside the cluster thus the need for a way to get it to the cluster (xmitq). Once inside the cluster the cluster alias will resolve it. Note that the RQMNAME was not blank on this alias definition and as such it would be used for routing not for cluster resolution.

The only way I would think to resort to the extremes of defining a remote queue to a cluster queue within the cluster is if you need to put a message manually to a qmgr where the queue is already present (trying to avoid the 5.3 behavior and load balance) but even then it would make sense to route the message through the cluster gateway just to be sure.


fjb_saper,

what I described was not a remote queue. A remote queue definition always contains the name of a target queue.

When you leave the target queue empty you have a thing called queue manager alias - this is something totally different.

You need a remote queue from outside the cluster, to define a way, to the cluster gateway. This remote queue must address a virtual queue manager name - such as ANY.NAME.AT.ALL.

On the cluster gateway you need a queue manager alias which is named like the virtual queue manager name and leave the attributes RNAME, RQMNAME and XMITQ empty.

Sample:

Remote queue (from outside the cluster):

Code:
DEFINE QREMOTE(queue_name) +
     RNAME(target_queue_name) +
     RQMNAME(virtual_qmgr_name) +
     XMITQ(gateway_qmgr)


QMgr alias (inside the cluster):

Code:
DEFINE QREMOTE(virtual_qmgr_name) +
     RNAME(' ') +
     RQMNAME(' ') +
     XMITQ(' ')


This mechanism resolves the queue target_queue_name on the QMgr gateway_qmgr. The queue may be local or somewhere in any of the clusters in which gateway_qmgr is a member of.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Sep 19, 2006 8:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Actually, anything that is a QREMOTE is a remote queue.

Sometimes QREMOTES function as qmgr or cluster aliases, though.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Tue Sep 19, 2006 9:08 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

jefflowrey wrote:
Actually, anything that is a QREMOTE is a remote queue.

Sometimes QREMOTES function as qmgr or cluster aliases, though.


jefflowrey,

to be exact: A QREMOTE is a MQ object, which may be used to define three (or four) different things (see the MQSC Command Reference, parameter description of the chapter Define queues):

1. If this definition is used for a local definition of a remote queue, RNAME must not be blank when the open occurs.

2. If this definition is used for a queue manager alias definition, RNAME must be blank when the open occurs.

3. If this definition is used for a reply-to alias, this name is the name of the queue that is to be the reply-to queue.

A cluster alias is a special usage of a QMgr alias and so a variation of case 2 (my fourth thing). When I use the wording remote queue I mean definition 1.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Tue Sep 19, 2006 9:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

And when I use "remote queue", I mean "QREMOTE".

When I say "remote queue definition", I mean your definition 1.

Edit: And when I want to be precise, I say "QREMOTE".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Sep 19, 2006 2:22 pm    Post subject: Reply with quote

Grand High Poobah

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

HubertKleinmanns wrote:
fjb_saper,

what I described was not a remote queue. A remote queue definition always contains the name of a target queue.



Hubert I was referring to this part of your message.
HubertKleinmanns wrote:


So on the sending QMgr you need something like:

DEFINE QREMOTE(remote_queue_name) RNAME(target_queue) RQMNAME(ANY.NAME.AT.ALL)
To me this meant clearly that you were populating the fields and not leaving them blank. Now you may have a cluster alias for routing on the sending qmgr but I would just have added the xmitq to the remote definition...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
HubertKleinmanns
PostPosted: Tue Sep 19, 2006 10:40 pm    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

fjb_saper,

I think we are talking about the same thing. Outside the cluster you need a remote queue definition (or local definition of a remote queue); inside the cluster (on the cluster gateway) you need a queue manager alias definition (or cluster alias definition).

The problem is, that the object QREMOTE is used, to define some totally different things. I often find kollegues, who do not see the difference between a remote queue definition and a queue manager alias definition.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Clustering » Putting from Outside the Cluster using Queue Manager Alias
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.