Author |
Message
|
shashivarungupta |
Posted: Tue Dec 28, 2010 11:36 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
mqjeff wrote: |
I suspect it goes to Belmont first because "AUTOCAD.TOBELMONT" is alphanumerically sooner than "AUTOCAD.TODERBY", and both have "DERBY" as their QMNAME. |
OMG... does it check for the alphabetical strings for channel name !!
I though the way entries we make in the .TAB File, in sequence, that matter.
Right now I just did the same thing but other way round.
I put BELMONT in place of DERBY. And Flipped the sequence of CLNTCONN channel definitions...first to belmont and second point to derby..like this :
C:\>mqsc -n -t AMQCHCHL2.TAB
Current channel table file not found
Can not find file 'C:\Program Files\IBM\WebSphere MQ\AMQCHCHL2.TAB'
>DEFINE CHANNEL(AUTOCAD.TOBELMONT) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('LOCALHOST(1417)') QMNAME(BELMONT)
AMQ8016: WebSphere MQ channel 'AUTOCAD.TOBELMONT' defined
>DEFINE CHANNEL(AUTOCAD.TODERBY) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('LOCALHOST(1416)') QMNAME(BELMONT)
AMQ8016: WebSphere MQ channel 'AUTOCAD.TODERBY' defined
>END
MQSC Ended
And NOW when I give following command it connects to the DERBY i.e. primary server qmgr instead of the belmont. ( if in case DERBY is down, it goes to BELMONT successfully )
C:\>amqscnxc *BELMONT
Sample AMQSCNXC start
Connecting to queue manager *BELMONT
with no client connection information specified.
Connection established to queue manager DERBY
Sample AMQSCNXC end
NOW here your logic of 'alphabetical strings' fails. Becoz in the similar looking .tab file we have the 'same' channel names but it connects to the DERBY one. _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 28, 2010 11:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
I suspect it goes to Belmont first because "AUTOCAD.TOBELMONT" is alphanumerically sooner than "AUTOCAD.TODERBY", and both have "DERBY" as their QMNAME. |
IIRC you're correct.
I have a faint memory of this being a "gotcha" because similarly named channels are searched in the order created.
I think that's why I've always called channels MY.APPLICATION.CHANNEL rather than naming where they're going.
But it might just be a weird habit I've picked up someplace.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 28, 2010 11:46 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
shashivarungupta wrote: |
NOW here your logic of 'alphabetical strings' fails. |
Well, that's why I said "suspect".
If I'd gone to the trouble to look up how channels are selected from the channel tab in the Clients manual, I'd have used a much more assertive word than "suspect". |
|
Back to top |
|
 |
shashivarungupta |
Posted: Tue Dec 28, 2010 11:57 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
vitor wrote: |
...similarly named channels are searched in the order created. |
if this would have been correct statement in all the cases then on COMMAND 'amqscnxc *BELMONT' it would have connected to BELMONT qmgr using 'AUTOCAD.TOBELMONT' channel in seq.no.1 in CCDT., for first come first serve in successful match.
 _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 28, 2010 12:05 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
shashivarungupta wrote: |
if this would have been correct statement in all the cases then on COMMAND 'amqscnxc *BELMONT' it would have connected to BELMONT qmgr using 'AUTOCAD.TOBELMONT' channel in seq.no.1 in CCDT., for first come first serve in successful match.
 |
If you're sure that's how the table was built.
But poked by my most worthy associate (and finding myself with a few moments spare as a production crash utterly unrelated to WMQ, WMB or anything I can be blamed for distracts my users) I found this in the Clients manual. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 28, 2010 12:25 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Vitor wrote: |
I found this in the Clients manual. |
Vitor wrote: |
finding myself with a few moments spare |
How's that other task going? Got your SVN server up and running then? |
|
Back to top |
|
 |
exerk |
Posted: Tue Dec 28, 2010 12:28 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Of course if shashivarungupta is using WMQ V7.0 he can always influence which channel to use with the Client channel weight (CLNTWGHT) attribute, alongside the AFFINITY attribute
The only reference I see to (possibly) which version is being used is a reference to a WMQ V6.0 Redbook. _________________ 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 |
|
 |
Vitor |
Posted: Tue Dec 28, 2010 12:28 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Vitor wrote: |
finding myself with a few moments spare |
How's that other task going? Got your SVN server up and running then? |
It's only an imbalance in the general ledger; it's not going to keep them off my back that long! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|