File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments