This project provides an end-to-end reference implementation to demonstrate how to implement hybrid messaging that connects public cloud to on-prem systems via a secure messaging solution. It uses Bluemix Secure Gateway to communicate to MQ deployed on a SoftLayer VM image (to mimic on-prem deployment)
The project also provides a simple Node.js application that publishes and subscribes to the MQ topics via MQLite protocol. It is deployed to Bluemix as a Cloud Foundry application.
Install a version of MQ on the SoftLayer VM that supports AMQP. Create and start a Queue Manager. Create and start the AMQP service.
More information here https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.ins.doc/q008250_.htm
- From the Bluemix Catalog, select Secure Gateway
- Click CREATE
- ADD GATEWAY
- Name GatewayToLocalMQ
- Add a destination, named OnPremMQ
- On-premises
- SoftLayer VM's IP address
- Port 5672
- Using TCP
- FTP Secure Gateway Client installation package to /tmp directory
- cd /tmp
- rpm -ivhf [file-name].rpm
- Start the client (after defining the Secure Gateway on Bluemix):
- cd /opt/ibm/securegateway/client
- node lib/secgwclient.js [gateway-id] --t [security-token]
- acl allow :5672
- After the Secure gateway client is started, the Secure Gateway on Bluemix will show as connected.
- Download and extract the code
- cd into the app directory
- cf push mqlight-sample
- Add the following environment variables to the sample app:
- MQ_SERVER: The secure gateway’s cloud host
- MQ_PORT: The secure gateway’s cloud port
- MQ_USER: A VM userid
- MQ_PASSWORD: The associated VM password