Skip to content

Commit ab0f181

Browse files
committed
Merge pull request #166 from hvivani/patch-2
Create readme.md
2 parents abc5df3 + 77ecacd commit ab0f181

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

kafka/readme.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Apache Kafka is publish-subscribe messaging system as a distributed commit log.
2+
3+
A single Kafka broker can handle hundreds of megabytes of reads and writes per second from thousands of clients.
4+
5+
It uses ZooKeeper so you need to first start a ZooKeeper server
6+
7+
Bootstrap action for EMR 3.x:
8+
s3://support.elasticmapreduce/bootstrap-actions/other/kafka_install.rb
9+
10+
To launch a cluster with Kafka installed using CLI Tools use the following command:
11+
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"
12+
13+
Basic commands for Kafka:
14+
15+
create topic (from master node):
16+
./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 3 --partitions 1 --topic test
17+
18+
list topics:
19+
./kafka-topics.sh --zookeeper localhost:2181 --list
20+
21+
send a message (from master node):
22+
./kafka-console-producer.sh --broker-list localhost:9092 --topic test
23+
24+
read messages from consumer (from slave node - change localhost by the master dns name):
25+
kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

0 commit comments

Comments
 (0)