Hi All,
First my environment:
Storm: 0.8.1
Kafka: 0.7.2
Storm-Kafka: storm-kafka-0.7.2-20120517.033754-1.jar
Zk: 3.3.4
I have a Node.js producer sending JSON payloads to Kafka using Node-Kafka (
https://github.com/marcuswestin/node-kafka). I am consuming these messages from Kafka using a KafaSpout-based topology. I have not been able to successfully deserialize the JSON object in my bolt. I have used json-simple (1.1.1) and jackson (2.1.4) libaries to no success. So my question is what is the Type written to disk by Kafka (docs say binary) vs. Type retrieved by KafkaSpout as a tuple. Here is the code I am using in my bolt to coerce type:
// System.out.print()
System.out.print("Tuple Received = " + tuple.toString()); // Tuple Received = [object Object]
// Jackson
ObjectMapper mapper = new ObjectMapper();
Map.Entry<String, String> promoterRegData = mapper.readValue(tuple.getString(0), Map.Entry.class);
Of course it fails even if I use the byte[]. I would appreciate some guidance here: parser, another compliant version of Storm, storm-kafka spout, Node.js client (Node-Kafka), etc.
Thanks,
Chris