Kafka-Setup-Notes
Kafka-Setup-Notes
Apache Kafka
==============
=> Apache Kafka is used to process real time data feeds with high throughput and
low latency
Ex : flights data, sensors data, stocks data, news data, social media etc....
===================
Kafka Terminology
===================
Zookeeper
Kafka Server
Kafka Topic
Message
Publisher
Subscriber
===========
Kafka APIs
===========
Connector API
Publisher API
Subscriber API
Streams API
========================================
Spring Boot + Apache Kafka Application
=======================================
URL : http://mirrors.estointernet.in/apache/zookeeper/stable/
URL : http://mirrors.estointernet.in/apache/kafka/
Step-4 : Start Zookeeper server using below command from Kafka folder
Step-5: Start Kafka Server using below command from Kakfa folder
Step-6 : Create Kakfa Topic using below command from kafka/bin/windows folder
============================================
Step-8 : Create Spring Boot Project in IDE
============================================
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
Sample Data
------------
{
"customerId":101,
"customerName":"Ashok",
"customerEmail":"[email protected]"
}
---------------------------------
[
{
"customerId":101,
"customerName":"Ashok",
"customerEmail":"[email protected]"
},
{
"customerId":102,
"customerName":"Raj",
"customerEmail":"[email protected]"
},
{
"customerId":102,
"customerName":"John",
"customerEmail":"[email protected]"
}