https://github.com/thepracticaldeveloper/kafka-spring-boot-example
Spring Boot application showing basic configuration to work with Kafka
https://github.com/thepracticaldeveloper/kafka-spring-boot-example
kafka practical spring-boot thepracticaldeveloper
Last synced: 3 months ago
JSON representation
Spring Boot application showing basic configuration to work with Kafka
- Host: GitHub
- URL: https://github.com/thepracticaldeveloper/kafka-spring-boot-example
- Owner: thepracticaldeveloper
- Created: 2018-11-18T08:57:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-07T14:29:40.000Z (12 months ago)
- Last Synced: 2025-05-07T15:37:38.065Z (12 months ago)
- Topics: kafka, practical, spring-boot, thepracticaldeveloper
- Language: Java
- Homepage: https://thepracticaldeveloper.com/spring-boot-kafka-config/
- Size: 81.1 KB
- Stars: 215
- Watchers: 4
- Forks: 104
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot Kafka Example - The Practical Developer
## Basic configuration
This sample application shows how to use basic Spring Boot configuration to set up a producer to a topic with multiple partitions and a consumer group with three different consumers.
The complete post with details is on The Practical Developer website: [Spring Boot and Kafka - Practical Configuration Examples](https://thepracticaldeveloper.com/spring-boot-kafka-config/).
[](https://thepracticaldeveloper.com/spring-boot-kafka-config/)
## Multiple serialization / deserialization formats
To illustrate the different configuration options, this application deserializes Kafka messages in three different ways:
* As a JSON to Java object.
* As a simple String (plain JSON).
* As a byte array.
## Docker compose
This code includes a `docker-compose.yml` file, so you can use Docker Compose to start up Kafka without installing anything.
## Was it useful?
Give a star to this project, and consider some extra readings:
* [My practical book about building a microservices architecture from scratch](https://amzn.to/3nADn4q).
* [The Full Reactive Stack Guide](https://leanpub.com/full-reactive/).
* [The Practical Architecture Guide](https://leanpub.com/practical-software-architecture).