Giter Club home page Giter Club logo

springboot-resilience4j's Introduction

springboot-resilience4j

This code is built to showcase how to use resilience4j and micrometer library along with spring-boot. It has implemented CircuitBreaker, RateLimit, Retry and Bulkhead features.

Requirements

JDK 1.8

Getting Started

It has two projects librarymanangement bookmanangement librarymanangement calls bookmanagement service.

Start both the applications -

Book Management Service gradlew build

java -jar build/libs/bookmanangement-0.0.1-SNAPSHOT.jar

url - http://localhost:8083/books

Library Management Service Change the url of Book Management service in LibraryConfig.java file (localhost or PCF url)

gradlew build

java -jar build/libs/librarymanangement-0.0.1-SNAPSHOT.jar

url - http://localhost:8084/library

Test the Get/Post methods with Swagger UI- http://localhost:8084/swagger-ui.html to ensure app methods working.

All the patterns are implemented in librarymanangement code.

Test the patterns

CircuitBreaker Pattern -

  First check the librarymanangement health url - http://localhost:8084/actuator/health 
  to see circuitbreaker metrics exposed through Prometheus
  It should show the state 'Closed' if the application is workin fine.
  
  Now, Stop the bookmanagement application.
  Test the Post method with Swagger UI- http://localhost:8084/swagger-ui.html
  Check the health url of librarymanagement - It should show the circuit state is 'Open'

springboot-resilience4j's People

Contributors

rajeshbhojwani avatar

Watchers

 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.