Skip to content

Create readme.md #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions kafka/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Apache Kafka is publish-subscribe messaging system as a distributed commit log.

A single Kafka broker can handle hundreds of megabytes of reads and writes per second from thousands of clients.

It uses ZooKeeper so you need to first start a ZooKeeper server

Bootstrap action for EMR 3.x:
s3://support.elasticmapreduce/bootstrap-actions/other/kafka_install.rb

To launch a cluster with Kafka installed using CLI Tools use the following command:
aws emr create-cluster \ --ec2-attributes KeyName="<YOUR_EC2_KEYNAME>" \ --log-uri="<YOUR_LOGGING_BUCKET>" \ --bootstrap-action \ Name="Install Kafka",Path="s3://support.elasticmapreduce/bootstrap-actions/other/kafka_install.rb" \ --ami-version=3.9.0 \ --instance-count=3 \ --instance-type=m1.medium \ --name="TestKafka"

Basic commands for Kafka:

create topic (from master node):
./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 1 --topic test

list topics:
./kafka-topics.sh --zookeeper localhost:2181 --list

send a message (from master node):
./kafka-console-producer.sh --broker-list localhost:9092 --topic test

read messages from consumer (from slave node - change localhost by the master dns name):
kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning