Appendix · OSS
Spring Kafka ↔ Apache Kafka — joint architecture & end-to-end sequence
A short appendix that wires the two existing pages together. One diagram shows how the Spring Boot application (KafkaTemplate on the produce side, @KafkaListener container hierarchy on the consume side) connects to a real Kafka cluster (broker, topic, partition leader / follower / ISR, consumer group). The second diagram traces a single message end-to-end across both sides — from application code calling send() through broker append + ISR replication, back through consumer fetch and the listener container, into the user's @KafkaListener method, and on to the offset commit.
Joint architecture
Two Spring Boot applications around the same Kafka cluster. The producer-side app uses KafkaTemplate (with optional transactions). The consumer-side app uses an @KafkaListener driven by Spring Kafka's container hierarchy. The cluster in the middle is the same Apache Kafka covered on the Apache Kafka page; the client-side pieces on either flank are the same ones covered on the Spring Kafka page.
Blue arrows: produce / commit requests. Green arrows: consumer fetch (uses zero-copy on the broker side). Dashed arrows: leader-to-follower replication and the internal dispatch chain inside the listener container. The cluster in the middle is the same one drawn on the Apache Kafka page; the producer and consumer flanks are the same components covered on the Spring Kafka page.
End-to-end sequence
A single record's journey across both halves — produce path on top, consume path on the bottom, with offset commit at the end.
Steps 1–7: produce path through KafkaTemplate → broker leader → ISR follower → HW advance → ack. Steps 8–13: consume path through ListenerConsumer → adapter → user method → offset commit to __consumer_offsets. The failure branch is summarised at the bottom and drawn in full on the Spring Kafka — Message Flow diagram.
Where to go next
- Apache Kafka/apache-kafka.html — broker / partition / ISR architecture, exactly-once, memory & CPU pipeline, CLI
- Spring Kafka/spring-kafka.html — container hierarchy, dispatch flow, features, internals
- My PRsSpring Kafka contributions
- My PRsApache Kafka contributions