r/SpringBoot • • Apr 09 '26

Discussion Struggling to understand Kafka (Java Developer – 2 yrs exp) – Need good resources šŸ™

Hi everyone,

I’m a Java Developer with around 2 years of experience, mainly working with Java, Spring Boot, and REST APIs.

Recently, I started learning Apache Kafka, but I’m finding it quite difficult to understand concepts like producers, consumers, partitions, offsets, and real-time processing. I’m not able to connect the theory with practical use cases properly.

Could you please suggest some good resources (videos, courses, blogs, or docs) that are beginner-friendly but also helpful for interview preparation?

My goal is to at least get Kafka concepts clear enough to confidently answer interview questions.

Also, if you have any tips or a roadmap on how to approach Kafka as a Java developer, that would be really helpful.

Thanks in advance! šŸ™Œ

40 Upvotes

18 comments sorted by

View all comments

1

u/New-Departure-5969 Sep 17 '26

Resource lists won't stick if you haven't broken a consumer once. Spin Docker Compose Kafka and one Spring Boot app: a POST that calls KafkaTemplate.send with an OrderCreated keyed by orderId, plus a @KafkaListener that does the work. Run a second instance with the same group.id and watch the partitions split. Kill one mid-handle and restart. You'll see the redelivery / duplicate problem without a lecture.

Then put a unique constraint or a processed_events row on orderId before the real side effect. That's the boring reason people talk about at-least-once, and why exactly-once (EOS) isn't day one.

Same key lands on the same partition, so ordering only holds there. Your RestTemplate sync path still makes sense when you need the answer in that HTTP response; Kafka is for when you don't. Interviewers care more that you've felt lag and dupes than that you finished another Confluent intro. Spring Kafka docs when you're stuck on a knob, not as the starting path.