MQ

  • 1.  What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Thu October 07, 2021 11:17 AM
    I am following the 9.2 instructions here to set up a uniform cluster configuration.  Part of this involves defining the cluster receiver channel.

    DEFINE CHANNEL('+AUTOCL+_+QMNAME+') CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('+CONNAME+') CLUSTER('+AUTOCL+') REPLACE

    When I first ran this I was getting the following error on the channel name:

         AMQ8454E: Syntax error found in parameter CHANNEL.

    Through trial and error I discovered that the maximum length that the "AUTOCL" value can be is 11 characters in the above (12 if I remove the "_").  12 or more causes the above error.  I thought channel names could be up to 20 characters long.  For cluster names the limit is 48 characters if I'm reading the documentation correct. 

    The value of AUTOCL appears to come from AutoCluster.clusterName in the qm.ini file.  What is the actual limit on the length of this value?  Is it 11 characters instead of 48 for my example?  I assume channel names in general can be up to 20 characters.  What is the explanation for the behavior I am seeing?  I've looked through the documentation but can't seem to find anything specific on this subject.

    Thanks,
    Jim







    ------------------------------
    Jim Creasman
    ------------------------------


  • 2.  RE: What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Thu October 07, 2021 11:44 AM
    The maximum length of the channel name is 20 characters as you say, but if you combine the +AUTOCL+ and +QMNAME+ in the channel name then they will need to fit into 20 characters when they are expanded. So the maximum cluster name you can use is not hard coded to 11 - it depends on the length of your queue manager name.

    ------------------------------
    Matthew Whitehead
    ------------------------------



  • 3.  RE: What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Thu October 07, 2021 12:49 PM
    Matthew,

         That's what I would have expected AUTOCL + QMNAME <= 20 chars long.  However, in my case these were the values being used:

    • AUTOCL = "TEST_CLUSTER"
    • QMNAME = "QM1"
    Concatenating these and adding a "_" in the middle still amounts to only 16 characters, not 20.  It is behaving as if 15 were the true limit.  The other possibility is that the length test is also counting "+" characters, though that doesn't quite add up right.

    Jim

    ------------------------------
    Jim Creasman
    ------------------------------



  • 4.  RE: What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Thu October 07, 2021 02:06 PM
    It's a little bit unusual in that the channel name needs to fit both before expansion and after expansion (there's a mention of this in the IBM Docs at https://www.ibm.com/docs/en/ibm-mq/9.2?topic=cluster-creating-new-uniform).

    That said, it looks like in your case both the pre-expansion and the post-expansion lengths are <= 20 characters?

    ------------------------------
    Matthew Whitehead
    ------------------------------



  • 5.  RE: What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Fri October 08, 2021 12:12 PM
    What QM names are you using for the other members of the uniform cluster? Can you share your full AutoCluster stanza?

    ------------------------------
    Matthew Whitehead
    ------------------------------



  • 6.  RE: What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Mon October 11, 2021 08:16 AM
    After looking into it more closely it does look like there may be a bug in the way the channel name length is calculated during variables expansion. I'll post something more concrete once we have confirmed it for sure, but for now you'll need to keep the length <= 20 characters after the first variable ("+AUTOCL+") is expanded and combined with the literal "+QMNAME+".

    ------------------------------
    Matthew Whitehead
    ------------------------------



  • 7.  RE: What is max allowed length of channel name for uniform cluster when using +AUTOCL+ parameter?

    Posted Mon October 11, 2021 01:17 PM
    Thanks for looking into this Matthew.  In case you still need the information the AutoCluster stanza looked similar to below.  I was invoking crtmqm with -iv CONNAME=

    AutoCluster:
      Repository1Conname=mq-penshop-inventory-server-msg-0.mq-penshop-inventory-server-msg.mqdev.svc.cluster.local(1414)
      Repository1Name=QC90
      Repository2Conname=mq-penshop-inventory-server-msg-1.mq-penshop-inventory-server-msg.mqdev.svc.cluster.local(1414)
      Repository2Name=QC91
      ClusterName=TEST_CLUSTER
      Type=Uniform

    For now I've worked around it by simply making the ClusterName 5 chars long.  The long host names are due in part to Kubernetes (where this is deployed).

    ------------------------------
    Jim Creasman
    ------------------------------