Infra Setup
- 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
- 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
- IBM MQ server container will start in Docker
Basic Queues setup
- Default IBM QM Admin console URL: https://:9443/ibmmq/console
- The default login for the console is:
- User: admin
- Password: passw0rd
- The Default Queue manager will be QM1
- Create your queues as required for your application by navigating to Manage->Create
- You are all set for using it as MQ infrastructure for your application development
- 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