Quick setup for IBM MQ Series Server and an Efficient MQ Tester
Pre-requisites:
- Install Docker (Tested on MacOSX and Linux variants)
- Install Java JRE (The client tool will prompt you)
cd mqserver
docker build -t my-ibmmq .
docker images
(should show sucessfully built image with repository name my-ibmmq)docker run -it -p 1414:1414 -p 9443:9443 my-ibmmq
docker container ls -a
(should show STATUS and PORTS)- (optional)
docker inspect <CONTAINER ID>
(show external IP address - sometimes useful if localhost acts weird) - https://localhost:9443 will get you to the admin console: username: admin; password: password1
- client executibles are located in
mq-test-james
folder ./run.sh
-- help to ensure client is workingvim test1.properties
file - you shouldn't have to change anything for a locally running queue. Otherwise, changeHOST_NAME
as necessary.
./put.sh test1.properties data.txt
-- this will put the data onHOST_QUEUE=DEV.QUEUE.1
.
./get.sh test1.properties
-- this will remove the data onHOST_QUEUE=DEV.QUEUE.1
.
./put.sh test1.properties 20 data.txt
-- this will put the 20 messages onHOST_QUEUE=DEV.QUEUE.1
.
./get.sh test1.properties
-- this will remove the 1 message fromHOST_QUEUE=DEV.QUEUE.1
. You should have 19 messages left../clear.sh test1.properties
-- this will remove remaining fromHOST_QUEUE=DEV.QUEUE.1
. You should have no messages left.
./run.sh PROCESS test1.properties
-- this will wait for a message onHOST_QUEUE=DEV.QUEUE.1
../put.sh test1.properties data.txt
-- this will put the data onHOST_QUEUE=DEV.QUEUE.1
. The previous command will get the message fromHOST_QUEUE=DEV.QUEUE.1
and put it onHOST_QUEUE=DEV.QUEUE.2
./get.sh dev.queue.2.properties
-- this will remove the 1 message fromHOST_QUEUE=DEV.QUEUE.2
.