Kafka
A distributed streaming platform.
can be used as an enterprise messaging system
can be used it as a stream processing platform. Kafka gives a stream, and we can plug in a processing framework.
Also provides connectors to export and import bulk data from databases and other systems.
https://kafka.apache.org/images/kafka_diagram.png
Install/Unzip Apache Kafka
tar -zxvf kafka_2.11-0.10.1.0.tgzStart Kafka Server
bin/zookeeper-server-start.sh config/zookeeper.propertiesbin/kafka-server-start.sh config/server.propertieskafka-topics.sh is a tool to manage a Kafka
Create Kafka Topic (replication factor 3, and 2 partitions)
bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic TopicName --partitions 2 --replication-factor 2describe Kafka Topic
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic TopicNameISR is a list of In Sync Replicas
Start Kafka Producer and Consumer
console producer
console consumer
Broker Configurations
complete list : https://kafka.apache.org/documentation/#brokerconfigs
Build.sbt
Simple Kafka producer
Last updated
Was this helpful?