You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by bigdata hadoop <ha...@gmail.com> on 2015/10/17 01:59:22 UTC
Spring xd stream - kafka
Hi Kafka Users
I am new to streams in spring xd and trying to consumer data from a topic.
I downloaded the spring xd single node on my laptop and ran the following
command:
1. stream create myKafka --definition "kafka
--zkconnect=localhost:2181 --topic=mytopic | log" --deploy
I did not see the log where it deployed. I checked under/tmp and
/xd/logs I did not find any. Where do I need to look for log.
Saw in C:\tmp\kafka-logs\myKafka-kafka-offsets-0 but was not sure how
to read this log. I did more and filename but it was unreadable file.
2. stream create myKafkaFile --definition "kafka
--zkconnect=localhost:2181 --topic=mytopic | file" --deploy
Tried this statement then got the numbers format of file under /tmp/xd/output.
Tried adding
stream create myKafkaFile --definition "kafka
--zkconnect=localhost:2181 --topic=mytopic | file
--outputType=text/plain" --deploy
and
stream create myKafkaFile --definition "kafka
--zkconnect=localhost:2181 --topic=msi_client_topic | file --mode=ref
--dir=/tmp/xd/output --pattern=*.txt" --deploy
and --binary=false
but was throwing error and did not deploy my stream.
I have JSON String in topic, Can any one please help with this to read
as a JSON string instead of numbers.
Thanks
Sowjanya