|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How do you get a QM to QM Alias itself |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Wed Jun 04, 2014 5:12 pm Post subject: How do you get a QM to QM Alias itself |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
QMZ is in another company, a company presumably infested with people who want to send messages to queues on your QMs that they have no business sending to.
QMEDGE is your internal QM that sits between your internal QMs and QMZ.
QMA is an internal queue manager that host a local queue called THE.LOCAL.QUEUE.FOR.QMZ.STUFF
Code: |
QMZ>>>SNDR/RCVR CHANNEL>>>QMEDGE>>>SNDR/RCVR CHANNEL>>>>QMA |
There is a remote queue def called FOR.COMPANYZ on QMEDGE
Code: |
DEFINE QREMOTE('FOR.COMPANYZ') +
RNAME('THE.LOCAL.QUEUE.FOR.QMZ.STUFF') +
RQMNAME('QMA') +
XMITQ('QMA') |
And on QMZ they have the following remote queue
Code: |
DEFINE QREMOTE('FOR.COMPANYZ') +
RNAME('FOR.COMPANYZ') +
RQMNAME('QMEDGE') +
XMITQ('QMEDGE') |
The QMZ.QMEDGE Receiver channel is running with an MCAUSER filler in with an ID that only allows puts to happen to FOR.COMPANYZ.
Everything is fine. Company Z can only send to the remote queue we set up for them on QMEDGE, and all other queues on QMEDGE and QMA are safe from Company Z. And they don't even know the name of the final queue.
Here's the topology change and my question.
QMB and QMC are internal QMs, and they are in the same MQ cluster as QMEDGE. QMZ and QMA are not and will not be in this MQ cluster.
QMB and QMC host a clustered local queue called THE.NEW.LOCAL.QUEUE.FOR.QMZ.STUFF.
We have to direct traffic thru QMEDGE to QMB and QMC and no longer to QMA. And QMZ should not have to change anything. Oh boy.
The remote queue def on QMEDGE must be deleted - I can't figure out how to have a remote queue on a clustered QM aim at clustered queues on other QMs in that cluster and get load balancing. (if you know a way stop reading now and lemme know!)
But if we replace that remote queue def with an Alias queue of the same name, it can load balance. On QMEDGE I delete the remote queue def and replace it with:
Code: |
DEFINE QALIAS('FOR.COMPANYZ') +
TARGET('THE.NEW.LOCAL.QUEUE.FOR.QMZ.STUFF') |
I use amqsputc to put to this alias queue, I get load balancing to QMB and QMC, and I'm feeling good.
Company Z starts putting to their remote queue and the DLQ on QMEDGE starts getting messages with 2082 - Unknown Alias Base Queue. Their remote queue def specifies QMEDGE as the destination QM. That locks in the name resolution to QMEDGE and doesn't allow the Alias queue def to pass the message thru and into the cluster.
I thought I could fake it out by defining the following QM Alias on QMEDGE, thinking maybe it would replace the Destination QM name of QMEDGE with blanks and thus allow load balancing.
Code: |
DEFINE QREMOTE('QMEDGE') +
RNAME(' ') +
RQMNAME(' ') +
XMITQ(' ') |
But this has no effect. Apparently in the Name Resolution chain if the destination QM is the same as the local QM, it skips any QM Alias magic.
A change on QMZ that works is changing RQMNAME to ('QMEDGEx'), then defining a good ol' fashioned QM Alias on EDGE QM called QMEDGEx.
Code: |
DEFINE QREMOTE('QMEDGEx') +
RNAME(' ') +
RQMNAME(' ') +
XMITQ(' ') |
But I don't want to have to make Company Z change anything. How do I get around this without making a change on QMZ? I thought a QM Alias to itself to blank out the QM name would work, but no luck. I was hoping I could stay with Remote Queue Defs but they don't allow load balancing apparently. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 04, 2014 6:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Peter, your question has a relatively easy answer...
On QMEDGE define:
Code: |
def qr(for.company.Z) +
RNAME(THE.NEW.LOCAL.QUEUE.FOR.QMZ.STUFF) +
RQMNAME('') +
XMITQ('') +
DEFOPEN(GROUP) +
REPLACE
or if you'd rather use a cluster alias (work with overlapping clusters?)
def qr(for.company.Z) +
RNAME(THE.NEW.LOCAL.QUEUE.FOR.QMZ.STUFF) +
RQMNAME(my.cluster.alias) +
XMITQ('') +
DEFOPEN(GROUP) +
REPLACE |
It's a little bit crude for load balancing. The best idea would be to have the cluster alias defined as in the cluster i.e. multiple targets in the cluster...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Jun 05, 2014 7:39 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Hey FJ,
A Remote Queue Def with a blank RQMNAME throws a MQRC 2087 when you try and use it.
I got this to work:
On QMZ they have the following remote queue. This is unchanged.
Code: |
DEFINE QREMOTE('FOR.COMPANYZ') +
RNAME('FOR.COMPANYZ') +
RQMNAME('EDGEQM') +
XMITQ('EDGEQM') |
On EDGEQM I do not delete the Remote Queue Def, I alter it to look like this:
Code: |
DEFINE QREMOTE('FOR.COMPANYZ') +
RNAME(‘THE.NEW.LOCAL.QUEUE.FOR.QMZ.STUFF') +
RQMNAME('FROMZ') +
XMITQ(' ') |
I do not create an Alias queue of any kind on EDGEQM.
On QMB and QMC I still have the clustered destination queue THE.NEW.LOCAL.QUEUE.FOR.QMZ.STUFF
But then I add this to QMB and QMC:
Code: |
DEFINE QREMOTE('FROMZ') +
RNAME(' ') +
RQMNAME(' ') +
XMITQ(' ') +
CLUSTER (‘My ClusterName’) |
And now that remote queue def on EDGEQM load balances to QMB and QMC, and the remote queue def at Company Z remains unchanged. And the RCVR channel from Company Z still only has access to the DLQ and the one queue.
It seems to work fine, just worried about unintended consequences or security gaps. Seems kinda simple now, makes me wonder what’s wrong with it. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 05, 2014 7:49 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Should be all good.
You should not get an error if you have a blank qmgr. May be you don't have the security set up to put to that queue on QMEDGE. With the cluster security setup you need the full queue name in the profile for a queue that is not local to the qmgr (security stanza for no xmitq...)
But if it works for you with a cluster alias all is good. I know I did use cluster alias to good effect for this type of load balancing.... It also allows you to resolve overlapping clusters on QMEDGE by having the clustered cluster alias definition only defined on a qmgr that does not overlap (like an FR?)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|