{"id":19125436,"url":"https://github.com/aracki/ibm_mq-spring-boot-jms","last_synced_at":"2026-05-06T15:40:01.360Z","repository":{"id":92273733,"uuid":"150733234","full_name":"Aracki/ibm_mq-spring-boot-JMS","owner":"Aracki","description":"Spring Boot application with JMS listener for IBM MQ. Ready to deploy as a Docker container.","archived":false,"fork":false,"pushed_at":"2018-11-01T12:58:28.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T09:44:56.409Z","etag":null,"topics":["docker","dockerfile","ibm-mq","jms","spring-boot","spring-jms"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aracki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-28T11:51:32.000Z","updated_at":"2024-08-16T01:56:52.000Z","dependencies_parsed_at":"2023-06-08T06:00:25.070Z","dependency_job_id":null,"html_url":"https://github.com/Aracki/ibm_mq-spring-boot-JMS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aracki%2Fibm_mq-spring-boot-JMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aracki%2Fibm_mq-spring-boot-JMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aracki%2Fibm_mq-spring-boot-JMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aracki%2Fibm_mq-spring-boot-JMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aracki","download_url":"https://codeload.github.com/Aracki/ibm_mq-spring-boot-JMS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240190909,"owners_count":19762591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dockerfile","ibm-mq","jms","spring-boot","spring-jms"],"created_at":"2024-11-09T05:35:46.893Z","updated_at":"2026-05-06T15:40:01.292Z","avatar_url":"https://github.com/Aracki.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBM MQ Spring Boot JMS\n\nThis repository contains Spring Boot application with JSM listener which listens on IBM MQ queue and write messages to file.\n\t\nHow to configure SSL: [TLS - IBM Developer](https://developer.ibm.com/messaging/learn-mq/mq-tutorials/secure-mq-tls/) \u003cbr\u003e\nDocker image used: https://hub.docker.com/r/ibmcom/ibmjava/  \u003cbr\u003e\nJava libraries used: [ibm-mq-allclient](https://mvnrepository.com/artifact/com.ibm.mq/com.ibm.mq.allclient/9.1.0.0) \u0026 [mq-jms-spring](https://mvnrepository.com/artifact/com.ibm.mq/mq-jms-spring-boot-starter/2.0.0)  \u003cbr\u003e\nMQ JMS Spring documentation: [mq-jms-spring](https://github.com/ibm-messaging/mq-jms-spring) \u003cbr\u003e\n\n## Generating certificates\n### Run temporary SERVER container without TLS to generate keys:\n\n1. `docker volume create qmdata` \n2. `docker network create mq-demo-network`\n3. `docker run -ti --entrypoint=/bin/bash --volume qmdata:/mnt/mqm ibmcom/mq:9.1.0.0`\n\n``` bash\ncd /mnt/mqm \nmkdir -p MQServer/certs\ncd MQServer/certs\n\n# Create a key database (also called the keyStore or certificate store), and add and stash the password for it.\nrunmqakm -keydb -create -db key.p12 -pw k3ypassw0rd -type pkcs12 -expire 1000 -stash\n\n# Use the runmqakm tool to create a self-signed certificate. The command line options we are using determine where the certificate should be held (key.p12), the label attached to the certificate (ibmwebspheremqqm1), the distinguished name to be included in the certificate (cn=qm,o=ibm,c=uk) and the keysize (2048 bits).\nrunmqakm -cert -create -db key.p12 -label ibmwebspheremqqm1 -dn \"cn=qm,o=ibm,c=uk\" -size 2048 -default_cert yes -stashed\n\n# If we look at the contents of the keyStore now, we’ll find that this self-signed certificate has been generated and added.\nrunmqakm -cert -list all -db key.p12 -stashed\n\n# We now need to extract the public key that the client application will need to be able to communicate with the queue manager. This is saved to a file named QM1.cert.\nrunmqakm -cert -extract -db key.p12 -stashed -label ibmwebspheremqqm1 -target QM1.cert\n```\n\n### Run temporary CLIENT to generate client key store\n`docker run -ti --entrypoint=/bin/bash --volume qmdata:/mnt/mqm --network mq-demo-network ibmcom/mq:9.1.0.0`\n\n``` bash\ncd /mnt/mqm\nmkdir -p MQClient/certs\ncd MQClient/certs\n\n# Use runmqakm to create a client trustStore.\nrunmqakm -keydb -create -db client_key.p12 -pw tru5tpassw0rd -type pkcs12 -expire 1000\n\n# From the /mnt/mqm/MQClient/certs folder, run the command to add the public key certificate to the client’s trustStore.\nrunmqakm -cert -add -label QM1.cert -db client_key.p12 -type pkcs12 -pw tru5tpassw0rd -trust enable -file ../../MQServer/certs/QM1.cert\n\n# Inspecting the contents of the trustStore will now show the queue manager’s public key.\nrunmqakm -cert -list all -db client_key.p12 -pw tru5tpassw0rd\n```\n\n## Run server\n### Run SERVER with TLS:\n\nCreate docker network if it’s not created already: `docker network create mq-demo-network`\n\n```\ndocker run --name mq-manager \\\n--volume qmdata:/mnt/mqm \\\n-p 1414:1414 \\\n-p 9443:9443 \\\n--network mq-demo-network \\\n--network-alias qmgr --detach \\\n--env MQ_APP_PASSWORD=passw0rd \\\n--env MQ_TLS_KEYSTORE=/mnt/mqm/MQServer/certs/key.p12 \\\n--env MQ_TLS_PASSPHRASE=k3ypassw0rd \\\n--env LICENSE=accept \\\n--env MQ_QMGR_NAME=QM1 \\\nibmcom/mq:9.1.0.0\n```\n\n## Run client\n\nBefore running docker container you will need to build Spring Boot project and Docker image:\n1. `./gradlew build`\n2. `docker build -t spring-mq-client .` from the root of the project\n\n### Run spring-mq-client with Docker\n\n```\ndocker run -it --name spring-mq-client --network mq-demo-network --volume qmdata:/mnt/mqm \\\n-e CONN_NAME=qmgr \\\n-e USER=app \\\n-e USER_PWD=passw0rd \\\n-e CHANNEL=DEV.APP.SVRCONN \\\n-e QUEUE_MGR=QM1 \\\n-e QUEUE_NAME=DEV.QUEUE.1 \\\n-e SSL_CIPHER_SUITE=SSL_RSA_WITH_AES_128_CBC_SHA256 \\\n--rm spring-mq-client\n```\n\n## Misc\n* For debugging add this:  `-Djavax.net.debug=ssl`\n* Default CACERT file path: `/opt/ibm/java/jre/lib/security/cacerts`\n* Run queue manager console: `runmqsc QM1` \n* See information about queue manager:  `DISPLAY CHANNEL(DEV.APP.SVRCONN)` \n* Creates a new queue: `DEFINE QLOCAL('testQueue')` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faracki%2Fibm_mq-spring-boot-jms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faracki%2Fibm_mq-spring-boot-jms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faracki%2Fibm_mq-spring-boot-jms/lists"}