> export CONFLUENT_HOME=~/projects/confluent/confluent-oss/3.3.0
> export PATH=$CONFLUENT_HOME/bin:$PATH
> which confluent
/Users/viktor/projects/confluent/confluent-oss/3.3.0/bin/confluent
> confluent start kafka
> kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 2 --topic word-count-input
> kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 2 --topic word-count-output
> kafka-console-consumer --bootstrap-server localhost:9092 \
--topic word-count-output \
--from-beginning \
--formatter kafka.tools.DefaultMessageFormatter \
--property print.key=true \
--property print.value=true \
--property key.deserializer=org.apache.kafka.common.serialization.StringDeserializer \
--property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer
> kafka-console-producer --broker-list localhost:9092 --topic word-count-input <
gamussa / kstreams-wordcount Goto Github PK
View Code? Open in Web Editor NEWStreaming version of Word Count with Kafka Streams