项目作者: ravening

项目描述 :
Microservice application to demonstrate bidirectional message communication between microservices
高级语言: Java
项目地址: git://github.com/ravening/spring-cloud-stream-microservice-communication.git


Event Driven communication between microservices

A Java microservice applicaton to demonstrate the bidirectional communication between microservices using spring cloud stream

Getting started

Prerequisites

Below are the softwares that needs to be installed as a dependency

  1. Java
  2. Maven
  3. Docker (to build Docker image)

Running the application

1 . Git clone the repo to any machine

2 . Start each of the microservice beginning with eureka-server

  1. cd eureka-server
  2. ./mvnw spring-boot:run

3 . Start the rabbitmq and the zipkin containers

  1. docker run -d --hostname my-test-rabbit --name test-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management
  2. docker run -d -p 9411:9411 openzipkin/zipkin

4 . Access the Rabbitmq ui by navigating to

  1. http://localhost:15672

Login using guest/guest as the credentials

4 . Once eureka-server is started and docker images are up and running we can start all other services

  1. cd <microservice-name>
  2. ./mvnw spring-boot:run

4 . Now create a new order by navigating to

  1. curl http://localhost:5000/api/order

This will send messages to both account service and product service.\
Each of the service process the message and sends a response back to order service.\

Built With

  • Maven - Dependency Management

Authors

Rakesh Venkatesh