Git Product home page Git Product logo

kafkaplayground's Introduction

Playing around with Kafka.

Spring Initializer settings:

  • H2
  • JPA
  • WEB

To run as executable via maven from the specific module:

mvn clean spring-boot:run

Key objects:

  • KafkaPlayground.postman_collection.json - Postman collection with REST requests
  • docker/kafka_playground/docker-compose.yml - Use it to run Kafka:
    • zookeeper - Kafka configuration storage
    • broker - Kafka itself
    • kafdrop - Web UI for displaying Kafka Broker content

ApacheKafka/CharactersGenerator module

  • config.AppConfig.java - Spring configuration. DB initialization with data is located there.

  • controller.CharactersController.java - Rest controller with REST endpoints.

  • entity.Characters.java - Abstract entity for SuperHero and SuperVillains entities. SINGLE_TABLE inheritance type is used.

  • entity.SuperHero.java - Entity that represents SuperHero entry.

  • entity.SuperVillain.java - Entity that represents SuperVillain entry.

  • repository.CharactersRepository.java - Repository with CRUD operations for Character entities (SuperHero, SuperVillain)

  • consumer.CharactersConsumerImpl.java - Common Apache Kafka consumer that fetches and processes data from 'analyzer' Kafka Topic

  • producer.CharactersProducerImpl.java - Common Apache Kafka producer that sends events to 'characters' Kafka Topic

ApacheKafka/CharactersAnalyzer module

  • config.AppConfig.java - Spring configuration

  • consumer.AnalyzerConsumerImpl.java - Common Apache Kafka consumer that fetches data from 'characters' Kafka Topic and sends data to CharactersAnalyzer service.

  • producer.AnalyzerProducerImpl.java - Common Apache Kafka producer that sends events to 'analyzer' Kafka Topic

  • service.CharactersAnalyzerServiceImpl.java - Service that analyzes data retrieved from AnalyzerConsumer

SpringKafka/SpringKafkaDemo module

  • resources/application.yaml - Spring Kafka properties
  • consumer.SpringKafkaConsumer.java - Spring Kafka consumer example.
  • producer.SpringKafkaProducer.java - Spring Kafka producer example.
  • controller.SpringKafkaController.java - Simple REST Controller with endpoint that sends a message which in its turn is produced to the Kafka Topic by SpringKafkaProducer and then consumed by SpringKafkaConsumer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.