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 » Lengthy ... but interesting channel config question.

Post new topic  Reply to topic Goto page 1, 2  Next
 Lengthy ... but interesting channel config question. « View previous topic :: View next topic » 
Author Message
friedl.otto
PostPosted: Wed Feb 06, 2008 5:37 am    Post subject: Lengthy ... but interesting channel config question. Reply with quote

Centurion

Joined: 06 Jul 2007
Posts: 116

Textbook SDR/RQSTR Example

On QMGR_A running on hostA.domain.com:4500
Code:
DEFINE QLOCAL('QXMT_A_B') DEFPSIST(YES) MAXDEPTH(10000) USAGE(XMIT) REPLACE
DEFINE CHANNEL('CHNL_A_B') CHLTYPE(SDR) CONNAME('hostB.domain.com(9000)') XMITQ('QXMT_A_B') REPLACE
DEFINE QREMOTE('QRMT_DATA') RQMNAME('QMGR_B') RNAME('QLCL_DATA') XMITQ('QXMT_A_B') DEFPSIST(YES) REPLACE


On QMGR_B running on hostB.domain.com:9000
Code:
DEFINE CHANNEL('CHNL_A_B') CHLTYPE(RQSTR) CONNAME('hostA.domain.com(4500)') REPLACE
DEFINE QLOCAL('QLCL_DATA') DEFPSIST(YES) MAXDEPTH(10000) REPLACE


What I saw in Production

On QMGR_A running on hostA.domain.com:4500
Code:
DEFINE QLOCAL('QXMT_A_B') DEFPSIST(YES) MAXDEPTH(10000) USAGE(XMIT) REPLACE
DEFINE CHANNEL('CHNL_A_B') CHLTYPE(SDR) CONNAME('hostB.domain.com(9000)') XMITQ('QXMT_A_B') REPLACE

Note the remote queue manager name:
Code:
DEFINE QREMOTE('QRMT_DATA') RQMNAME('QXMT_A_B') RNAME('QLCL_DATA') XMITQ('QXMT_A_B') DEFPSIST(YES) REPLACE


On QMGR_B running on hostB.domain.com:9000
Code:
DEFINE CHANNEL('CHNL_A_B') CHLTYPE(RQSTR) CONNAME('hostA.domain.com(4500)') REPLACE
DEFINE QLOCAL('QLCL_DATA') DEFPSIST(YES) MAXDEPTH(10000) REPLACE


And here's another little gem to make this hack work:
Code:
DEFINE QREMOTE('QXMT_A_B') DEFPSIST(YES) REPLACE


This really works, and the reason for using stated for perpetrating this
evil is as follows:

It simplifies configuring multiple environments without configuring too
much host details into the remote queues.

Questions
1. Why does this even work? Is the remote queue manager name irrelevant?
2. Why does it not work without the remote queue called 'QXMT_A_B'?
3. This is claimed to be IBM endorsed best practice, could that be?


Last edited by friedl.otto on Wed Feb 06, 2008 6:02 am; edited 2 times in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 06, 2008 5:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You have a typo in your first set of definitions, I think.

I think you meant "RQMNAME('QMGR_B')".
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 06, 2008 6:01 am    Post subject: Re: Lengthy ... but interesting channel config question. Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

friedl.otto wrote:
1. Why does this even work? Is the remote queue manager name irrelevant?


No, but it works because of the queue manager alias

friedl.otto wrote:
2. Why does it not work without the remote queue called 'QXMT_A_B'?


Because you need to alias the queue manager name. See 1.

friedl.otto wrote:

3. This is claimed to be IBM endorsed best practice, could that be?


Ask IBM. I've no idea what they endorse for requester channels.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 06, 2008 6:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
You have a typo in your first set of definitions, I think.

I think you meant "RQMNAME('QMGR_B')".




_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
friedl.otto
PostPosted: Wed Feb 06, 2008 6:04 am    Post subject: Reply with quote

Centurion

Joined: 06 Jul 2007
Posts: 116

Thanks for the typo alert. FIXED!
_________________
Here's an idea - don't destroy semaphores unless you're certain of what you're doing! -- Vitor
Back to top
View user's profile Send private message
friedl.otto
PostPosted: Wed Feb 06, 2008 6:08 am    Post subject: Re: Lengthy ... but interesting channel config question. Reply with quote

Centurion

Joined: 06 Jul 2007
Posts: 116

Vitor wrote:

No, but it works because of the queue manager alias.


I don't think I understand ... queue manager alias? All I'm seeing is a
strange 'blank' remote queue definition.

Vitor wrote:

Ask IBM. I've no idea what they endorse for requester channels.


But given the amount of certified greatness around I would have thought
mqseries.net has an idea of the IBM thought processes.
_________________
Here's an idea - don't destroy semaphores unless you're certain of what you're doing! -- Vitor
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 06, 2008 6:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's a mistake to assume that a corporation of roughly 300,000 employees has a thought process. *

If that "blank" remote queue definition is on QMGR_B, then it's being used in name resolution. The setup here is the same as a multihop configuration A->B->C, except it's going A->B->B.

*the chips don't work that well yet... ; - )
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 06, 2008 6:20 am    Post subject: Re: Lengthy ... but interesting channel config question. Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

friedl.otto wrote:
Vitor wrote:

No, but it works because of the queue manager alias.


I don't think I understand ... queue manager alias? All I'm seeing is a
strange 'blank' remote queue definition.


Which we call a "queue manager alias". The Search button is your friend.

friedl.otto wrote:

But given the amount of certified greatness around I would have thought
mqseries.net has an idea of the IBM thought processes.


Many individuals in here do, I personally don't because I don't work for them. It's not impossible someone more authoritative than me may respond, until then I continue recommend that if you want to know why IBM endorse a particular method, you ask IBM.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
friedl.otto
PostPosted: Wed Feb 06, 2008 6:25 am    Post subject: Reply with quote

Centurion

Joined: 06 Jul 2007
Posts: 116

jefflowrey wrote:
It's a mistake to assume that a corporation of roughly 300,000 employees has a thought process.

He He He ... so the words 'best practice', 'preferred usage pattern' or any
such terminology is pointless.

jefflowrey wrote:
If that "blank" remote queue definition is on QMGR_B, then it's being used in name resolution. The setup here is the same as a multihop configuration A->B->C, except it's going A->B->B.


I hear what you're saying, but no resolution can come from that object. It
does not reference valid terminal objects.

Here is my super-simplified message traversal:

1. Java application establishes client connection to its queue manager (QMGR_B) on the specified host and specified port.
2. Java application commits an MQ_PUT to the remote queue (QRMT_ONE).
3. The remote queue (QRMT_ONE) is in essence a specialised alias for te transmission queue (QXMT_A_B) which wraps the payload with "XQH" metadata.
4. Sender/Server channel (CHNL_A_B) is notified that it has a pending message on the transmission queue (QXMT_A_B).
5. Sender/Server channel (CHNL_A_B) transmits the "XQH" metadata and payload to the specified host on the specfied port.
6. The Requester channel (CHNL_A_B) receives the "XQH" metadata and payload.
7. The Requester channel (CHNL_A_B) validates the "XQH" metadata.
8. If this is RQMNAME and object RNAME exists try to dereference RNAME.
9. If RNAME could be dereferenced, deliver message.
_________________
Here's an idea - don't destroy semaphores unless you're certain of what you're doing! -- Vitor
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 06, 2008 6:31 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

friedl.otto wrote:
I hear what you're saying, but no resolution can come from that object. It
does not reference valid terminal objects.


Yes it can, yes it does. Look up queue manager aliases as I suggested a few posts back.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 06, 2008 6:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

friedl.otto wrote:

7. The Requester channel (CHNL_A_B) validates the "XQH" metadata.
8. If this is RQMNAME and object RNAME exists try to dereference RNAME.
* At least a couple of missing steps
9. If RNAME could be dereferenced, deliver message.


There certainly are best practices. Some of them are much more situational than others. To suggest a flavor of this - it is not best practices to use Requester channels, unless it's necessary for some reason.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 06, 2008 6:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

friedl.otto wrote:
jefflowrey wrote:
It's a mistake to assume that a corporation of roughly 300,000 employees has a thought process.

He He He ... so the words 'best practice', 'preferred usage pattern' or any
such terminology is pointless.


It's only valid in so far as it's an accumulation of experience and opinions from 1-n people, where n is a number less than 300,000.

Much like this board really.

Some of the "best practice", like not setting message id and having unique names in clusters, is very much the best way. The advice then slides down through "preferred usage pattern", "suggestion configuration" towards pure opinion.

So you must take what you can from it, as it applies to your situation.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
friedl.otto
PostPosted: Wed Feb 06, 2008 6:35 am    Post subject: Re: Lengthy ... but interesting channel config question. Reply with quote

Centurion

Joined: 06 Jul 2007
Posts: 116

Vitor wrote:
Which we call a "queue manager alias". The Search button is your friend.


Just to confirm, from this...

* Queue manager alias
* Remote queue resolution
* Aliases on remote queues

... there seems to be a difference between an ALIAS and a QREMOTE. I
suspected as much since a QREMOTE adds "XQH" metadata, and an ALIAS
simply resolves to a QLOCAL. Am I missing something obvious?
_________________
Here's an idea - don't destroy semaphores unless you're certain of what you're doing! -- Vitor
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Feb 06, 2008 6:40 am    Post subject: Re: Lengthy ... but interesting channel config question. Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

friedl.otto wrote:
... there seems to be a difference between an ALIAS and a QREMOTE. I
suspected as much since a QREMOTE adds "XQH" metadata, and an ALIAS
simply resolves to a QLOCAL. Am I missing something obvious?


No that's about it, though I take some issue with the concept of a QREMOTE "adding" the transmission header. Providing the information for it certainly, but adding it?

See also:

http://www.mqseries.net/phpBB2/viewtopic.php?t=41708&highlight=

for a recent discussion on the difference between a remote queue and an alias queue which may be relevent.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
friedl.otto
PostPosted: Wed Feb 06, 2008 6:58 am    Post subject: Re: Lengthy ... but interesting channel config question. Reply with quote

Centurion

Joined: 06 Jul 2007
Posts: 116

Vitor wrote:
No that's about it, though I take some issue with the concept of a QREMOTE "adding" the transmission header. Providing the information for it certainly, but adding it?

While I am perusing your link...

Why do you take offence to the concept of "adding data"? If you put a
message directly onto a transmission queue, and then dump it ... it does not
look the same as when you've put it on the remote queue and dump it from
the transmission queue. I would say the remote queue resolution has
strapped some metadata to the message before dumping it in the
transmission queue.

As for the 'queue manager alias' I guess this should remove my -v:

* http://www.mqseries.net/manuals/intercommunication/csqzae060p.htm
* http://www.mqseries.net/manuals/intercommunication/csqzae060q.htm
* http://www.mqseries.net/manuals/intercommunication/csqzae060r.htm


_________________
Here's an idea - don't destroy semaphores unless you're certain of what you're doing! -- Vitor
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » Lengthy ... but interesting channel config question.
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.