Hi Val,
I'm just playing around with Camel-Ignite component for a POC. my goal is to
parse the JSON data and put it to Ignite's cache.
I got the syntax from Camel-Ignite component's test project [1]
After some changes in my code now the data is inserting into the Ignite's
cache (by checking the entries in Ignite Visor) but when querying the result
is showing empty.
Here is the code:
from("mqtt:bar?subscribeTopicName=test&host=tcp://10.10.1.34:1883")
.setHeader("id", new JsonPathExpression("$.id"))
.setHeader("firstName", new JsonPathExpression("$.firstName"))
.setHeader(IgniteConstants.IGNITE_CACHE_KEY, new
JsonPathExpression("$.id"))
.process(new Processor() {
public void process(Exchange exchange)throws Exception {
exchange.getIn().setBody(
exchange.getIn().getBody(String.class));
}
})
.to("ignite-cache:cache:Person?operation=PUT");
What am I missing?
[1]
https://github.com/apache/camel/blob/master/components/camel-ignite/src/test/java/org/apache/camel/component/ignite/IgniteCacheTest.java
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Using-Camel-Ignite-for-inserting-json-object-to-Ignite-s-Cache-tp13513p13568.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.