Alford Miller
asked on
How do set up a bridge to forward messages n WebsphereMQ?
I need to set up a Bridge Server for WebsphereMQ transaction queues to facilitate communication between two servers which are being hosted by external providers. In my environment I need to establish MQ communications for long term transactions with two servers that are being managed by two different external providers. Both servers are in the cloud and so are on the other side of our firewalls and direct communication cannot be established between providers, all communications are through my network.
The question is how to set up a bridge server to capture messages from server 1 and forward them to server 2 as well a send replies and acknowledgements back?
The question is how to set up a bridge server to capture messages from server 1 and forward them to server 2 as well a send replies and acknowledgements back?
Hi! Was my answer able to solve your question? :)
ASKER
I was trying to use your solution and If my understanding is correct this will not work. What I need is service to bridge the messages from the source system to the destination system where source and destination systems cannot talk directly with each other but both can communicate with the intermediate (bridge) server. Let me know what you think.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Telemetry Daemon is a part of WebSphere MQ Telemetry installation . Here is the information center link to this: http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqtat.doc/tt60500_.htm.
Its simple and easy to understand and use this component. Its a 50KB program which run in 150KB or less memory (actual figures vary) making it ideal to run on a small computing devices. Applications can publish messages to this daemon and it can in-turn forward them to WebSphere MQ server or any other MQTT server. There are several other tasks that this can perform which are described in the information center.
In this post we'll look at building a solution using a set of sensors and WebSphere MQ Telemetry Daemon:
1. First we need a some sensors. I recommend using a evaluation kit for this purpose: JN5139 IEEE802.15.4/JenNet Evaluation Kit for demo purposes. In a development environment its easier to use this kit as it can be reprogrammed to your needs. Each sensor has an onboard temperature, light and humidity sensor. The evaluation kit has a flash programmer that can be used to program these sensors. The code can be written in C language using the Jennic SDK. For demonstration purposes we programmed the sensors to captured the measurements of temperature, light intensity and humidity every 5 seconds and send the data to the controller.
2. The controller is connected to a small computer via the serial cable. On the computer we have 2 programs running:
a. A program that reads data from serial port.
b. The MQ telemetry Daemon for Devices
As you can observe the data input to this small computing device is not from TCP/IP, but rather from serial port. Zigbee standard is used for sensor to controller communication in a Wireless Sensor network. MQTT or MQTT-S can be used on these devices for communication. Using the SDK provided by Jennic, the sensors can be programmed to use MQTT/MQTT-S protocol to communicate with the controller.
3. The program that reads the data from the serial port does a simple task of connecting and exchanging MQTT messages with MQ telemetry Daemon for Devices. Normally WebSphere MQ Server is run at the enterprise level. This could be in a different location like a server room where all the other enterprise software resides. But the telemetry daemon can be installed on a network device in a building. It can route essential information as MQTT messages to the WebSphere MQ server in the enterprise.
Now let's look at using Device Daemon... Its simple to start on a windows machine. The license, properties and file location should be as follows and it takes just a second to launch...
Open in new window
4. Let's configure the bridge component of telemetry Daemon to send the message to WebSphere MQ. Create a text file with the contents:
Open in new window
Replace the<ipaddress> with the IP address of the system where the WebSphere MQ telemetry is setup on the WebSphere MQ server. The bridge will start once the daemon is started and establish a connection with the server. If the server is not available, it will attempt a reconnect a regular intervals. The configuration file will ensure that the messages published by the MQTT clients to topics starting with "sensor/" are routed to the WebSphere MQ server.
5. On the server side for testing purposes use the WebSphere MQ Explorer and start the sample client program. That is go to "Telemetry" node under <qmgrname>/Advanced/Teleme
6. The program that reads the data from the serial port can now publish messages to this telemetry daemon. For testing purposes, let's use a sample provided with the WebSphere MQ telemetry installation to publish messages to telemetry Demon:
Open in new window