Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Handling Processing Errors in Kafka Streams Processor API

This module demonstrates how to use the processing exception handler to manage processing errors in Kafka Streams Processor API.

Prerequisites

To compile and run this demo, you’ll need:

  • Java 25
  • Maven
  • Docker

Running the Application

To run the application manually:

  • Start a Confluent Platform in a Docker environment.
  • Create a topic named delivery_booked_topic.
  • Start the Kafka Streams application.

To run the application in Docker, use the following command:

docker-compose up -d

This will start the following services in Docker:

  • Kafka Broker
  • Control Center
  • Kafka Streams Processing Exception Handler Processor API

Try It Out

Using the Kafkagen produce command, you can produce DeliveryBooked events to the delivery_booked_topic topic.

kafkagen produce -f ../.kafkagen/default-record.json

To trigger the processing exception handler, produce a record with a missing numberOfTires field. This will result in a NullPointerException:

kafkagen produce -f ../.kafkagen/processing-error-record.json