liveBook · Manning

Message-driven pojo

As explained in Kafka Streams in Action, Second Edition

A message-driven POJO is an ordinary Java object whose methods receive messages through framework configuration rather than Kafka-specific inheritance.

A message-driven POJO is an ordinary Java class that receives Kafka messages through Spring Kafka annotations and configuration, without Kafka-specific inheritance. A @KafkaListener connects a method to a topic and consumer group, while property replacements keep deployment settings outside the code. section 12.2.1

Loan application processing

A NewLoanApplicationProcessor listens for loan applications, evaluates approval criteria, and sends the processed record to an accepted or rejected topic with KafkaTemplate. It can also publish selected records to a quality-assurance topic. Separate listener methods handle accepted, rejected, and QA loans. section 12.2.1

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains listener annotations, property-based topics and groups, message routing, and typed handlers, while leaving business processing details open.
Examples
Demonstrates loan approval routing, quality-assurance publication, and separate handlers for accepted, rejected, and QA applications.
What you can do after
Operate/configure Spring Kafka consumers by annotating Java methods, externalizing topic settings, and publishing results with KafkaTemplate.
How it connects
Connects Spring Kafka, Kafka consumers, Kafka topics, consumer groups, KafkaTemplate, and KafkaHandler.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.