Quick IBM MQ development setup in docker

Infra Setup

  1. Download IBM MQ docker image from docker community
    • Docker hub link: https://hub.docker.com/r/ibmcom/mq/
    • Pull IBM Mq docker image using the command: docker pull ibmcom/mq
  2. Create a volume and map it to a physical path to be used for MQ data storage
    • volume: docker volume create qm1data
    • Map volume & Run Docker Image:
docker run \
  --env LICENSE=accept \
  --env MQ_QMGR_NAME=QM1 \
  --publish 1414:1414 \
  --publish 9443:9443 \
  --detach \
  --volume qm1data:/Users/magnet/Apps/ibm-mq/mqm \
  ibmcom/mq
  1. IBM MQ server container will start in Docker

Basic Queues setup

  1. Default IBM QM Admin console URL: https://:9443/ibmmq/console
  2. The default login for the console is:
    • User: admin
    • Password: passw0rd
  3. The Default Queue manager will be QM1
  4. Create your queues as required for your application by navigating to Manage->Create
  5. You are all set for using it as MQ infrastructure for your application development
  6. Refer to the following screenshots for reference

Spring Default Configurations

application.properties

ibm.mq.queueManager=QM1
ibm.mq.channel=DEV.ADMIN.SVRCONN
ibm.mq.connName=localhost(1414)
ibm.mq.user=admin
ibm.mq.password=passw0rd

applicaiton.yml

ibm:
  mq:
    queueManager: "QM1"
    channel: "DEV.ADMIN.SVRCONN"
    connName: "localhost(1414)"
    user: "admin"
    password: "passw0rd"

Maven Dependencies

 <dependency>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-databind</artifactId>
     </dependency>
     <dependency>
         <groupId>com.ibm.mq</groupId>
         <artifactId>mq-jms-spring-boot-starter</artifactId>
         <version>2.0.0</version>
 </dependency>

GitHub references

https://github.com/ibm-messaging/mq-container/blob/9.2.0/docs/usage.md

https://github.com/ibm-messaging/mq-container/blob/9.2.0/docs/developer-config.md

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *