camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solomon <austin.solomon...@gmail.com>
Subject How to Extract json key, value from MQTT payload
Date Tue, 06 Jun 2017 12:20:43 GMT
Hi,

I have created a camel route of mqtt -> jdbc which pushes the data in json
format into MQTT topic, now I want to extract the json key and value so that
I can insert it into jdbc database.

sample json payload : { "id": 1, "name": "Test" }

My Camel route looks like this :

        from("mqtt:bar?subscribeTopicName=test&host=tcp://localhost:1883")
        .process(new MyProcessor()) // Extract json data here
        .to("jdbc:myDataSource?resetAutoCommit=false"); 

Can any one help me on how to get the values.

Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-Extract-json-key-value-from-MQTT-payload-tp5801958.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message