camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Huston <shus...@riverace.com>
Subject RE: How to Extract json key, value from MQTT payload
Date Tue, 06 Jun 2017 14:48:40 GMT
That depends totally on what MyProcessor does with the data and where it puts it.

> -----Original Message-----
> From: solomon [mailto:austin.solomon007@gmail.com]
> Sent: Tuesday, June 06, 2017 8:21 AM
> To: users@camel.apache.org
> Subject: How to Extract json key, value from MQTT payload
> 
> 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