/simple-mq

Simple project to write and get message in IBM MQ using python

Primary LanguagePythonApache License 2.0Apache-2.0

Simple project to write and get message in IBM MQ using python

Download cliente for python

https://developer.ibm.com/articles/mq-downloads/#python

Direct link

Redist (grab & go) MQ Downloads

Unzip the file and add the path to the LD_LIBRARY_PATH variable.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./9.3.0.0-IBM-MQC-Redist-LinuxX64/lib64

setting up the environment

Download IBM MQ Dev version

mqadv_dev930_linux_x86-64

Installing IBM MQ Client

sudo ./mqadv_dev930_linux_x86-64/MQServer/mqlicense.sh
sudo rpm -ivh ./mqadv_dev930_linux_x86-64/MQServer/MQSeriesRuntime-9.3.0-0.x86_64.rpm
sudo rpm -ivh ./mqadv_dev930_linux_x86-64/MQServer/MQSeriesGSKit-9.3.0-0.x86_64.rpm
sudo rpm -ivh ./mqadv_dev930_linux_x86-64/MQServer/MQSeriesClient-9.3.0-0.x86_64.rpm

Install dependencies

poetry install

Usage simple-mq

poetry shell 

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/${USER}/simple-mq/ibm-mq/lib64

python -i main.py

# Writing 1000 messages
put_mensagem(1000)

Open new terminal

poetry shell 

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/${USER}/simple-mq/ibm-mq/lib64

python -i main.py

# Get message with wait
get_mensagem_wait()

add-on running IBM MQ

The official IBM project can be used

mq-container

Credits

PyMQI

IBM