File tree Expand file tree Collapse file tree 3 files changed +51
-3
lines changed
Expand file tree Collapse file tree 3 files changed +51
-3
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ Each subdirectory in this repository represents a specific integration or featur
1414
1515Below you will find a summary table of each subproject. For more details, please refer to the individual README.md files.
1616
17- | Name | Description |
18- | ---------------------------------------------------- | ------- ------------------------------------------------------------------------|
19- | [ Spring Boot + Kafka] ( ./spring-kafka-example ) | Demonstrates a basic integration between Spring Boot and Apache Kafka. |
17+ | Name | Description |
18+ | -----------------------------------------------| ------------------------------------------------------------------------|
19+ | [ Spring Boot + Kafka] ( ./spring-kafka-example ) | Demonstrates a basic integration between Spring Boot and Apache Kafka. |
2020
2121---
2222
Original file line number Diff line number Diff line change 1+ # spring-kafka-example
2+
3+ ---
4+
5+ ## Overview
6+
7+ Basic Java Spring (Java 21) project showing simple integration with Apache Kafka.
8+ Includes a Kafka producer and consumer with minimal setup for local development.
9+
10+ ---
11+
12+ ## Tech stack
13+
14+ - Spring Boot
15+ - Java 21
16+ - Kafka (Docker)
17+
18+ ---
19+
20+ ## Related Resources
21+
22+ | Description | Link |
23+ | --------------------------------------------------| ------------------------------------------------------------------------------------------------------------|
24+ | Spring Kafka Official Docs | [ spring.io/projects/spring-kafka] ( https://spring.io/projects/spring-kafka ) |
25+ | Various Kafka setups and approaches using Docker | [ github.com/conduktor/kafka-stack-docker-compose] ( https://github.com/conduktor/kafka-stack-docker-compose ) |
Original file line number Diff line number Diff line change 11services :
2+
23 server :
34 build :
45 context : .
@@ -8,3 +9,25 @@ services:
89 SERVER_PORT : " 80"
910 SPRING_PROFILES_ACTIVE : " default"
1011
12+ zookeeper :
13+ image : confluentinc/cp-zookeeper:7.4.0
14+ environment :
15+ ZOOKEEPER_CLIENT_PORT : 2181
16+ ZOOKEEPER_TICK_TIME : 2000
17+ ports :
18+ - ' 2181:2181'
19+
20+ kafka :
21+ image : confluentinc/cp-kafka:7.4.0
22+ depends_on :
23+ - zookeeper
24+ ports :
25+ - ' 9092:9092'
26+ - ' 29092:29092'
27+ environment :
28+ KAFKA_BROKER_ID : 1
29+ KAFKA_ZOOKEEPER_CONNECT : zookeeper:2181
30+ KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
31+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
32+ KAFKA_INTER_BROKER_LISTENER_NAME : PLAINTEXT
33+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
You can’t perform that action at this time.
0 commit comments