Search code examples
dockerdocker-composeibm-mqcharacter-limit

How to Increase Application Data Limit (Beyond 1024) for IBM MQ in Docker Setup?


I am using Docker to set up IBM MQ (with a web server) and I need to increase the character limit for messages in the queue. Currently, the character limit is set to 1024, but I would like to increase it.

I have configured my docker-compose.yml as shown below:

services:
  mqseries:
    image: ibmcom/mq:latest
    ports:
      - "1414:1414"
      - "9443:9443"
    hostname: mq
    environment:
      - LICENSE=accept
      - MQ_QMGR_NAME=QM1
    container_name: mqserver
    stdin_open: true
    tty: true
    restart: always

In the IBM MQ configuration, I tried setting the MQ_MAX_MSG_LENGTH environment variable to 4096, but it doesn't seem to take effect.

Here is a screenshot of the current IBM MQ configuration: enter image description here

Could someone guide me on how to increase the application data limit beyond 1024 for IBM MQ in this Docker setup, if possible?


Solution

  • Couple of points:

    1. The IBM MQ container images are now hosted at icr.io/ibm-messaging/mq. Please use the MQ image from this repository.

    2. You are viewing the message payload via the MQ Web Console. The MQ Web Console will display only the first 1024 bytes of the message payload. This is the default size.

    You can use any of the MQ Sample applications or write your own MQ JMS application to browse or get the message which will give you full message payload.

    The default size can be changed by running setmqweb command with mqConsoleMaxMsgCharsToDisplay parameter - https://www.ibm.com/docs/en/ibm-mq/9.4?topic=reference-setmqweb-properties-set-mqweb-server-configuration-properties. As you are using MQ Container running the setmqweb command to update properties will work as long as the container is running. I think it is possible to provide your own mqwebuser.xml (through a mounted volume) containing the properties of your choice - Refer https://github.com/ibm-messaging/mq-container/issues/296.