In today’s microservices and event-driven architecture, Apache Kafka is the de facto for streaming applications. However, setting up Kafka for local development in conjunction with your Spring Boot application can be tricky, especially when configuring it to run locally.
Spring Boot application provides support for Kafka integration through the spring-kafka maven package. To work with spring-kafka, we need to connect to the Kafka instance. Typically, during development, we would just run a local Kafka instance and build against it. But with Docker Desktop and containers, things are much easier to set up than running a local Kafka instance. This article guides us through the steps for setting up the local Kafka container with the Spring Boot application.