question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[resilience4j-ratpack] Documentation is misleading, incomplete, or invalid

See original GitHub issue

While attempting to implement the resilience4j-ratpack package into my ratpack application, I am encountering a few issues regarding the documentation

1. The first of which is the following line of code from the basic usage:

install(Resilience4jModule.class);

The error I get from that can be seen below:

2. Later in the docs, about adding configuration, it uses an instance instead of passing in the class, but in calling the configure method, I am getting an exception:

java.lang.ClassNotFoundException: io.github.resilience4j.metrics.CircuitBreakerMetrics

I’m not even trying to use CircuitBreaker. Below is my code:

Resilience4jModule resilience = new Resilience4jModule();
resilience.configure(config -> config
    .retry("elastic", retry -> retry
        .maxAttempts(3)
        .waitDurationInMillis(100)
    )
);
install(resilience);

No idea why I’d be getting an exception about circuit breaking. I included the curcuitbreaker package in my gradle, and still I get the exception.

3. Missing explanations/definitions. For example, in the docs for retry, it references a retry variable without any context around what that is. It also is too simple of an example to be useful, resolving with a string.

What if my promise resolves with a ReceivedResponse from an external service that I am attempting to retry on failures? I can’t just instantiate one. Maybe some clarification needs to exist on what you are allowed to resolve from your promises that you attempt to retry.


At this point, I am attempting to use the annotation approach, but cannot get past the exception being thrown in bullet point 2.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

0reactions
RobWincommented, Apr 12, 2018

@drmaas Created a PR and fixed the issue. A new 0.13.0-SNAPSHOT should be created soon by TravisCI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction - resilience4j
Resilience4j is a lightweight fault tolerance library designed for functional programming. Resilience4j provides higher-order functions (decorators) to enhance ...
Read more >
CircuitBreaker - resilience4j
The CircuitBreaker is implemented via a finite state machine with three normal states: CLOSED, OPEN and HALF_OPEN and two special states DISABLED and ......
Read more >
Getting Started - resilience4j
Setup. Add the Spring Boot Starter of Resilience4j to your compile dependency. The module expects that org.springframework.boot: ...
Read more >
resilience4j
Resilience4j is a lightweight fault tolerance library inspired by Netflix Hystrix, but designed for functional programming.
Read more >
Introduction - resilience4j
Resilience4j is a lightweight, easy-to-use fault tolerance library inspired byNetflix Hystrix, but designed for Java 8 and functional programming.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found