Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dimitri
Active Contributor
0 Kudos

The first part of this blog series contains a small introduction to the MQTT(*) concept. This part will highlight a demo scenario where temperature data is received – asynchronously – from a device. The device data is offered in JSON format and contains the temperature, the sensor ID and a timestamp. Obviously, this data can be sent to a SAP system or written to a flat file e.g., but that is not in scope of this blog.

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

{

  "Company": "TheValueChain",

  "TemperatureData": {

      "SensorID": "000011",

      "Temperature": "28,0°C",

      "Timestamp": "20160825"

  }

}

Before diving into the configuration, let’s have a look at the device simulation part of the scenario. Basically, this is what you have to keep in mind

First of all, configure a sender MQTT adapter to subscribe to a specific topic.

Note that, at the bottom of the screenshot, I indicated that I wanted to have both the message metadata and the payload available in the monitoring tools. The input data is in JSON format. Therefore, do not forget to set the transform indicator on the second tab page. That’s it for the sender adapter!

Once you’ve activated everything, you can see in the monitoring that the adapter will connect to the MQTT broker

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

Also some useful Message Attributes can be noticed

In this demo, the source message type and namespace were not modified or used. Just to keep it simple and straightforward.

In part III, I will explain how to set up a synchronous scenario were data is retrieved from a SAP system and offered back to the MQTT broker.

(*) More information can be found here or here.

2 Comments
Labels in this area