Quickly setup a test MQ docker container and test with sample producer and consumer application
Build a custom docker container from the official IBM MQ container image using the instructions in Dockerfile
docker build --pull --rm -f "Dockerfile" -t mq:1.0 "."
Run the custom built docker container in interactive mode
docker run -d -p 1414:1414/tcp -p 9157:9157/tcp mq:1.0
Run the sample app in producer mode to put message on the queue
java -jar .\mq-samples.jar -l false
Run the sample app in consumer mode to get messages from the queue
java -jar .\mq-samples.jar -l true
Run the sample app with --help parameter to show various parameter options
java -jar .\mq-samples.jar -help
One useful argument is the "-n {numMessages}" where numMessage is the number to messages to get or put to the queue. By default this value is 1.