Skip to content

Demo app showing how to setup local configuration for kafka infrastructure (broker, zookeeper, schema registry) with a topic, producer and consumer.

Notifications You must be signed in to change notification settings

PRODYNA/insights-kafka-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aeeaa8e · Jul 6, 2023

History

7 Commits
May 12, 2023
Jun 18, 2023
Jul 6, 2023
Jun 28, 2023
May 12, 2023
Jul 6, 2023
May 12, 2023
May 12, 2023
May 12, 2023
Jun 28, 2023

Repository files navigation

Kafka demo

Main purpose of this application is to show how to setup

  • local configuration for kafka infrastructure (broker, zookeeper, schema registry)
  • with a topic, producer and consumer

By using /api/kafka/publish/messages endpoint we will publish messages that will be consumed by our listener.

Config

  • openjdk 17
  • spring boot 3.0.6

How to

In order to upload schema and/or generate AVRO sources after that do next:

  • go to folder root/kafka and run docker-compose up make sure that all services are up and running
  • run mvn validate
  • go to http://localhost:8081/schemas and check if schema for UserCreated is registered
  • in case that you want to generate local AVRO sources (the one that we are using is already part of the repo) run mvn generate-sources
  • run the app and produce some messages via curl -X GET http://localhost:8080/demo/api/kafka/publish/messages
  • observe the logs :)
  • use control center to access broker http://localhost:9021/clusters

Swagger UI

http://localhost:8080/demo/swagger-ui/index.html

Activity diagram

activity_diagram.png

Useful links

About

Demo app showing how to setup local configuration for kafka infrastructure (broker, zookeeper, schema registry) with a topic, producer and consumer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages