Skip to content

No CircuitBreakerNameResolver set in circuitBreakerFeignBuilder Bean #1210

@nanobot248

Description

@nanobot248

We are trying to use Feign with Resilience4j, but without the @EnableFeignClients annotation.
When trying to use the circuitBreakerFeignBuilder Bean created in

to create Feign clients (via the target method), the following exception is thrown:

java.lang.NullPointerException: Cannot invoke "org.springframework.cloud.openfeign.CircuitBreakerNameResolver.resolveCircuitBreakerName(String, feign.Target, java.lang.reflect.Method)" because "this.circuitBreakerNameResolver" is null
	at org.springframework.cloud.openfeign.FeignCircuitBreakerInvocationHandler.invoke(FeignCircuitBreakerInvocationHandler.java:98)
...

Unfortunately, the four FeignCircuitBreaker.Builder methods circuitBreakerFactory, feignClientName, circuitBreakerGroupEnabled and circuitBreakerNameResolver are not public, therefore it is not possible to set the circuitBreakerNameResolver (without reflection).

It would be nice having either a working circuitBreakerFeignBuilder bean or to be able to set the properties manually.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions