MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Increase Queue application data length on CP4I

    Posted Tue August 02, 2022 02:12 AM
    Hi,

    We are trying to put the application data inside the message queue and increased the message length as 104857600(100MB). Still the application data showing is 1024 only. 

    We are unable to put the complete message in queue. 

    Kindly, give us the resolution.





    ------------------------------
    Abhiram Emmadishetty
    ------------------------------


  • 2.  RE: Increase Queue application data length on CP4I

    Posted Tue August 02, 2022 09:53 AM

    It looks like you are doing an MQGET and getting a 1024 byte message.

    Could this be and old message from before you made the change?
    If you tried to put a big message, and there was a problem the MQPUT would have failed.
    Colin



    ------------------------------
    Colin Paice
    ------------------------------



  • 3.  RE: Increase Queue application data length on CP4I

    Posted Tue August 02, 2022 10:05 AM

    Remember to not only change the queue maximum message length but also the channel maximum message length.

     

    For future development you might want to change the default queues and default channels to this maximum message length so all newly built queues will have the length.

     

    I normally change:

    Queues:

    SYSTEM.DEFAULT.LOCAL.QUEUE

    SYSTEM.DEFAULT.MODEL.QUEUE

    Channels:

    SYSTEM.DEF.SVRCONN

     

    If you want to change everywhere then you can change all SYSTEM.DEF.* channels and any already created SVRCONN channels to the new maximum size to fix your 100MB messages.

     

     

    Susan Barker

    Lead MQ, ACE, ITX, Kafka, WAS Architect

    Victory is nothing without humility, respect and charity...unknown

    Let no one ever come to you without leaving happier...Mother Theresa

    Logo, company name  Description automatically generated

    IBM WAS Advisory Board

    IBM ACEvNext Beta Program

    IBM MQvNext Beta Program

     

     

     






  • 4.  RE: Increase Queue application data length on CP4I

    Posted Wed August 03, 2022 11:46 AM
    Edited by Emir Garza Wed August 03, 2022 11:56 AM

    Hi Abhiram,

    From your screenshot, it seems you are trying to put the message using the MQ Console. The maximum message size you can put using the console is 1024 bytes.

    To put 100MB messages, you need:

    1) As Susan said, MAXMSGL(104857600) on three places: the Queue Manager, the Queue, and the SVRCONN Channel. For example:

        ALTER QMGR MAXMSGL(104857600)

        DEFINE QLOCAL('Q1') REPLACE DEFPSIST(NO) MAXMSGL(104857600)

        DEFINE CHANNEL(QM8CHL) CHLTYPE(SVRCONN) REPLACE TRPTYPE(TCP) SSLCAUTH(REQUIRED) SSLCIPH('ANY_TLS12_OR_HIGHER') MAXMSGL(104857600)

    2) A client program capable of putting 100MB messages. None of the provided samples can put 100MB. I modified the JMS Put Sample (JmsPut.java): 

                char[] chars = new char[104857600]; // to put 100MB

                Arrays.fill(chars, 'a'); // to put 100MB

                String str = new String(chars); // to put 100MB

     

                // long uniqueNumber = System.currentTimeMillis() % 1000;  // to put 100MB

                TextMessage message = context.createTextMessage(str);  // to put 100MB

     

    3) If your messages are persistent, a large enough file system for the MQ log. On my system, I got this error:

    MQRC 2102 (Resource problem)

    AMQ7463E: The log for queue manager QM8 is full.

    (I managed to put 100MB non-persistent messages, but this may not be a good idea for you if your application requires persistence.)

    Regards,

    PS. This is a very good article. It is not specific to CP4I, but the general principles apply: "Instructions and Warnings: How to increase the MAXMSGL for MQ Queue Managers, Queues and Channels from the default 4 MB to a higher number" https://www.ibm.com/support/pages/node/400151

    ------------------------------
    Emir Garza
    ------------------------------



  • 5.  RE: Increase Queue application data length on CP4I

    Posted Thu August 04, 2022 12:14 AM
    Hi Emir Garza & Susan,

    Thanks for your support and suggestions. 

    As Emir given me the resolution in 3 different ways. We will check it out.

    Thanks

    ------------------------------
    Abhiram Emmadishetty
    ------------------------------



  • 6.  RE: Increase Queue application data length on CP4I

    Posted Thu August 04, 2022 04:48 AM
    Hi Abhiram,
    I put this as a "PS" in my post,  but it's important enough to go in its own post, so here it is.

    This is a very good article, which I strongly recommend. It is not specific to CP4I, but the general principles apply: "Instructions and Warnings: How to increase the MAXMSGL for MQ Queue Managers, Queues and Channels from the default 4 MB to a higher number" www.ibm.com/support/pages/node/400151

    Regards,

    ------------------------------
    Emir Garza
    ------------------------------



  • 7.  RE: Increase Queue application data length on CP4I

    Posted Thu August 04, 2022 05:07 AM
    Hi Emir,

    Thanks for the article. Any further assistance we will approach you.

    Thanks

    ------------------------------
    Abhiram Emmadishetty
    ------------------------------