Kafka is a distributed, partitioned, replicated commit log service. It provides the functionality of a messaging system, but with a unique design.
[root@sandbox kafka_2.8.0-0.8.1]# bin/kafka-server-start.sh config/server.properties
[root@sandbox kafka_2.8.0-0.8.1]# bin/kafka-topics.sh –create –replication-factor 1 –zookeeper localhost:2181 –partition 1 –topic demoTopic
Created topic “demoTopic”.
[root@sandbox kafka_2.8.0-0.8.1]#
[root@sandbox kafka_2.8.0-0.8.1]# bin/kafka-topics.sh –list –zookeeper localhost:2181
demoTopic
[root@sandbox kafka_2.8.0-0.8.1]#
[root@sandbox kafka_2.8.0-0.8.1]# bin/kafka-console-producer.sh –broker-list localhost:9092 –topic demoTopic
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Kirjutame siia midagi…
Kuulame:
[root@sandbox kafka_2.8.0-0.8.1]# ./bin/kafka-console-consumer.sh –zookeeper localhost:2181 –topic demoTopic –from-beginning