The first part of this blog series contains a small introduction to the MQTT concept. The second part highlights a demo scenario getting temperature data asynchronously. This part will highlight a synchronous scenario, where data is retrieved from the SAP system and offered back to the MQTT broker and back to the device simulation side. To keep it simple, I used the well-known Flight data example, available in every SAP system.

This is how the input data actually looks like in JSON format

{

“Agency”: “110”,

  “FlightDetails”: {

      “AirlineID”: “AA”,

      “ConnID”: “0017”,

      “Date”: “2015-05-13”

  },

}

First of all, configure a sender MQTT adapter to subscribe to a specific topic. This is basically the same as for the scenario in the previous blog part, except now we also need a reply topic. And off course, the QoS is Best Effort.

/wp-content/uploads/2016/08/1_1023808.png

On the device simulation side, do not forget to subscribe to the reply topic. This provides the result immediately

/wp-content/uploads/2016/08/2_1023812.png

If everything goes well, you will see both the JSON and XML data in the Message Log

/wp-content/uploads/2016/08/3_1023813.png

The reply message from SAP is also available in the Message Log, both in XML and JSON format

/wp-content/uploads/2016/08/4_1023814.png

And finally, this is how it looks like on the device simulation side.

/wp-content/uploads/2016/08/5_1023818.png

You can actually see the response data, in JSON format again.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply