Kafka Schema Registry & Avro: Spring Boot Demo (1 of 2)

Rob Golder
Lydtech Consulting
Published in
6 min readOct 22, 2022

--

Kafka Schema Registry & Avro: Spring Boot Demo (1 of 2)

This is the first of a two part article detailing a Spring Boot demo application that provides an end to end example of an application using Kafka as the message broker along with Confluent Schema Registry and Avro serialization. In this first part an overview of the application is provided along with steps to run the demo. In the second part the implementation is covered in detail.

An overview of the benefits of using a message schema, choosing Avro for serialization, and adding a schema registry to the architecture is provided in the article Kafka Schema Registry & Avro: Introduction.

The source code for the Spring Boot demo is available here:

https://github.com/lydtechconsulting/kafka-schema-registry-avro/tree/v1.0.0

Spring Boot Application Overview

The application simulates a basic payments service, which receives a command event from the inbound Kafka topic send-payment that triggers a payment to be made. The intention would be that a third party banking service would be called via REST to instruct the payment. This call is shown in the diagram below for illustrative purposes, but is just implemented as a no-op call in the code. To complete the processing the application then produces an event to the payment-sent topic…

--

--