GithubHelp home page GithubHelp logo

fikri1234 / springboot_kafka_consumer_group_and_replyto Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 6.66 MB

Implement Spring boot Kafka to produce data - consumer group and reply topic to another one

Java 100.00%
springboot kafka gradle

springboot_kafka_consumer_group_and_replyto's Introduction

SpringBoot_Kafka_Consumer_Group_and_ReplyTo

Installation Kafka & implement Spring boot Kafka to produce data - consumer group and reply topic to another one

Prerequisites

  1. Java 8
  2. Dev Tools
  3. Lombok
  4. Zookeper
  5. Kafka
  6. Gradle

Getting Started

Architecture

Alt text

Installation & Running Zookeeper

  1. Download and extract Zookeper https://zookeeper.apache.org/releases.html
  2. Go to Zookeper directory, then open conf directory
  3. Rename file zoo_sample.cfg to zoo.cfg
  4. Create folder "dataz" inside Zookeeper directory
  5. Edit zoo.cfg and change dataDir to "Zookeper directory"/dataz
  6. Screenshot Edit zoo.cfg
  7. Run Zookeeper by open new command inside Zookeper directory and type by following command .\bin\zkServer.sh

Installation & Running Kafka

  1. Download and extract Kafka Binary https://kafka.apache.org/downloads
  2. Go to Kafka directory, then open config directory
  3. Create 3 Broker Properties by copy paste from file server.properties and rename it by following number server-1.properties, server-2.properties, server-3.properties
  4. Screenshot Edit server-1.Properties
  5. Screenshot Edit server-2.Properties
  6. Screenshot Edit server-3.Properties
  7. Run broker 1 by open cmd in Kafka directory and type .\bin\windows\kafka-server-start.bat .\config\server-1.properties
  8. Screenshot Start Broker 1
  9. Run broker 2 by open cmd in Kafka directory and type .\bin\windows\kafka-server-start.bat .\config\server-2.properties
  10. Screenshot Start Broker 2
  11. Run broker 3 by open cmd in Kafka directory and type .\bin\windows\kafka-server-start.bat .\config\server-3.properties
  12. Screenshot Start Broker 3

Spring Boot

  1. Open a new command prompt in the app directory,and type ./gradlew bootRun
  2. Hit the URL localhost:8181/send-group/ Alt text
  3. Hit the URL localhost:8181/send/ Alt text
  4. Hit the URL localhost:8181/send-reply/ Alt text

springboot_kafka_consumer_group_and_replyto's People

Contributors

fikri1234 avatar

Stargazers

zhangyu avatar

Watchers

James Cloos avatar  avatar

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.