This application is an adaptation of this blog: https://www.baeldung.com/spring-cloud-stream-kafka-avro-confluent
The application is adapted to using Spring Cloud Stream 3.0.2.RELEASE
.
The components are using the functional model by providing Supplier
(producer) and Consumer
(StreamListener) beans.
The application communicates with Confluent schema registry and uses avro serialization and deserialization.
Following are the instructions to run the app:
-
Start Kafka Broker and Confluent Schema Registry (Expecting them to be available on default hostname/port).
-
Run the application.
-
Run this command:
curl -X POST localhost:8080/employees/1001/Harry/Potter
-
Watch the console of the application to ensure that the message is logged.