Apache Kafka: Difference between revisions

From air
Jump to navigation Jump to search
Line 44: Line 44:
</pre>
</pre>


==Extra==
===Extra===
Launch Zookeeper shell
Launch Zookeeper shell
<pre>
<pre>

Revision as of 15:09, 5 April 2014

Apache Kafka is Publish-Subscribe messaging rethought as a distributed commit log.

http://kafka.apache.org/

Clients en Perl, Python, Node.js, C, C++, Scala ...: https://cwiki.apache.org/confluence/display/KAFKA/Clients

First steps with Kafka

see Quickstart

cd kafka

Launch Zookeeper

./bin/zookeeper-server-start.sh ./config/zookeeper.properties

Launch Kafka server

./bin/kafka-server-start.sh ./config/server.properties

Create a topic

./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

Launch Kafka console producer

./bin/kafka-console-producer.sh --broker-list localhost:2181 --topic test

Launch Kafka console consumer

./bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test


Stop all

./bin/kafka-server-stop.sh
./bin/zookeeper-server-stop.sh

Extra

Launch Zookeeper shell

./bin/zookeeper-shell.sh localhost:2181