spring-cloud / spring-cloud/spring-cloud-openfeign

Support circuit breaker configuration per Feign client

Open
#487 3 comments 3 reactions 1 assignee View on GitHub

@OlgaMaciaszek is already working on this.

Since Feb 25, 2021.

enhancement
Dominant language
Java
Stars
1.3k
Forks
838
Avg merge
2d 11h
Merged PRs (30d)
13

Description

Is your feature request related to a problem? Please describe.
Currently, there seems to be no way to configure different circuit breakers for different Feign clients without listing all their methods.
I can either customize the default configuration, but then this configuration will be applied to all Feign clients. On the other hand, if I want to customize a specific configuration, I must do so for all its methods, as the circuit breaker name is <feignClientName>-<methodName>.

Describe the solution you'd like
A simple solution would be to also check for a circuit breaker called feignClientName if no more specific one is found.

An ideal solution would be similar to the other Feign configuration, i.e. I can specify a Customizer Bean in the Feign configuration, like ErrorDecoder or Retryer. This customizer would then be applied to just this Feign client.

Describe alternatives you've considered
As I said, the current alternatives would be to list all methods in a client, which is quite error-prone.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.