Code Monkey home page Code Monkey logo

kafka-spring-boot-demo's Introduction

This is a project to demonstrate a basic Kafka-Spring Boot integration.

Submodules pipeline build status:

  • Message Producer Build Status
  • Message Processor Build Status
  • Message Consumer Build Status

Initial application structure and flow

Image of Flow

Message producer provides api (see Swagger)

How to start project

  • Clone the project with submodules using following command
git clone --recurse-submodules [email protected]:rednavis/kafka-spring-boot-demo.git 
  • Run these commands to create a network and run Kafka and Zookeeper in docker containers.
docker network create kafka
 
docker run -d --net=kafka --name=zookeeper -e ZOOKEEPER_CLIENT_PORT=2181 confluentinc/cp-zookeeper:5.0.0
docker run -d --net=kafka --name=kafka -p 9092:9092 -e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 confluentinc/cp-kafka:5.0.0
  • If you can’t connect, add this line to /etc/hosts to ensure proper routing to container network “kafka”
127.0.0.1 kafka
  • Start messaging platforms with docker start command
docker start zookeeper
docker start kafka
  • Start submodules by calling ./mvnw spring-boot:run in each module.

Swagger

After starting message-producer you can find Swagger UI page at localhost:57300/demo/api/swagger-ui.html

kafka-spring-boot-demo's People

Contributors

alabotski avatar leyar avatar

Watchers

James Cloos avatar  avatar

kafka-spring-boot-demo's Issues

Add tests

  1. Add unit tests
  2. Add integration tests for every microservice
  3. Add embedded Kafka tests
  4. Add system integration test

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.