Deploy the IBM MQ Server, as describe in the ibm-mq-server-deploy/README.md
Change the IBM MQ Server address in the MQRoute.java class file
ibmip=`kubectl get svc/ibm-mq-server -ojsonpath="{.spec.clusterIP}"`; sed -i "/mqHost/s/\".*\"/\"$ibmip\"/g" MQRoute.java
For licensing reasons, the IBM MQ Java libraries are not defined in the routes themselves, but you can declare the dependency while running the integration. Alternatively you can use Kamel modeline to add the dependency in the route file as a header.
kamel run --dev MQRoute.java -d mvn:com.ibm.mq:com.ibm.mq.allclient:9.2.5.0
It will print the following output in the console
JmsConsumer[DEV.QUEUE.1]) Exchange[ExchangePattern: InOnly, BodyType: String, Body: Hello Camel K! #2]
The following kamel commands, has three distincts configurations:
Secret
object.Run the integration to generate messages and send them to the IBM MQ Queue (there is no output in the console)
kamel run --dev jms-ibm-mq-sink-binding.yaml -d mvn:com.ibm.mq:com.ibm.mq.allclient:9.2.5.0 --config secret:ibm-mq/ibm-mq-password -p serverName=`kubectl get svc/ibm-mq-server -ojsonpath="{.spec.clusterIP}"`
Run the integration to retrieve messages from the IBM MQ Queue and print in the console.
kamel run --dev jms-ibm-mq-source-binding.yaml -d mvn:com.ibm.mq:com.ibm.mq.allclient:9.2.5.0 --config secret:ibm-mq/ibm-mq-password -p serverName=`kubectl get svc/ibm-mq-server -ojsonpath="{.spec.clusterIP}"`