GithubHelp home page GithubHelp logo

raj-util / event-driven-microservice-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mudiadamz/event-driven-microservice-example

0.0 0.0 0.0 189 KB

event driven microservice example with apache kafka

Java 100.00%

event-driven-microservice-example's Introduction

Event-driven Microservices using Spring Boot and Apache Kafka

This is the full event driven microservice example using spring boot codes with Apache Kafka as messaging broker. You can clone this full code and test it yourself, understand better what microservice event driven software design. Blog post https://www.techgalery.com/2021/07/event-driven-microservice-spring-boot.html

To run your kafka server

docker-compose up -d

If you want to stop your kafka server run this command

docker-compose rm -fsv

To run consumer-service

cd consumer-service
mvnw spring-boot:run

To run producer-service

cd consumer-service
mvnw spring-boot:run

Hit POST test_api

curl --location --request POST 'http://localhost:8080/test_api' \ --header 'Content-Type: application/json' \ --data-raw '{ "dataKey": "kafkaKey123", "dataBody": "Hello world kafka messaging!" }'

See the log at consumer-service microservice, that's the consumer event that is firing.

You can also use kafka tool to view the message/logs/event that being produce by the application, download kafka tool here https://kafkatool.com/download.html

Screenshoots

  • postman
    alt text
  • kafka tool
    alt text

event-driven-microservice-example's People

Contributors

mudiadamz 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.