Home > Blockchain >  Create queues in IBM MQ (docker compose )
Create queues in IBM MQ (docker compose )

Time:10-27

I'm developing a Spring Boot app which is using IBM MQ. I want all of that to be configured in the docker compose. But the problem is that in the app there are used custom queues that were created from the UI in the browser, example of application.yml file:

...
ibm:
  mq:
    queues:
      first: QUEUE1
      second: QUEUE2

How do I create these queues on the startup now when I'm I want to run it from the docker compose file? When I was running ibm mq manually I was using command like this:

docker run --env LICENSE=accept --env MQ_QMGR_NAME=QM1 --publish 1414:1414 --publish 9443:9443 --detach ibmcom/mq:latest

And now I'm almost doing the same but in the docker-compose.yml file:

...
 ibm-mq:
    image: 'ibmcom/mq:latest'
    container_name: ibm-mq
    ports:
      - "1414:1414"
      - "9443:9443"
    environment:
      - LICENSE = accept
      - MQ_QMGR_NAME = QM1

Is there any environment variables to create custom queues or how do I do that? I didn't find any solution to this.

CodePudding user response:

Chapter Customizing the queue manager configuration describes the options:

You can customize the configuration in several ways:

  1. For getting started, you can use the default developer configuration, which is available out-of-the-box for the MQ Advanced for Developers image
  2. By creating your own image and adding your own MQSC file into the /etc/mqm directory on the image. This file will be run when your queue manager is created.
  3. By using remote MQ administration, via an MQ command server, the MQ HTTP APIs, or using a tool such as the MQ web console or MQ Explorer.
  • Related