resilience4j/resilience4j
@Retry annotation does not work with Micrometer
Aperta
#1996 aperta il 17 lug 2023
help wanted
Metriche repository
- Star
- (9218 stelle)
- Metriche merge PR
- (Merge medio 17g 3h) (6 PR mergiate in 30 g)
Descrizione
Resilience4j version: 1.7.0 Java version: 17.0.7
The Retry annotation we have does not work with Micrometer retry?
The reason is because it does not take into account the reference.
All our code has @Retry annotation and we decided to use Micrometer retry, but realized the annotation does not specify the ID/Reference.
import io.github.resilience4j.retry.annotation.Retry
@Retry(name = "backend-a")
fun retrieve(id: String): List<User> {
println("Calling retrieveUsers2")
throw IllegalStateException("Test $id")
}
This is my code and I should be able to add resilience4j-micrometer to the annotation without needing it to bind it. It should already bind it to the retry annotation or at least the name of the retry. This functionality is missing.