-
Notifications
You must be signed in to change notification settings - Fork 804
Description
Hello!
I'm working on application consisting of multiple microservices.
We are using Consul for service discovery and spring load-balancer for client-side load-balancing.
Our microservices communicates with each-other over HTTP calls and we are using spring open-feign as convenient declarative http-client wrapper.
And everything works like a charm, but...
One of our microservices should load a piece of business data from external resource over http and we also used spring open-feign to create a client for the external service but with 'url' parameter configured as absolute URL.
It worked fine until I added spring-retry into classpath.
After adding spring-retry into classpath, instance of RetryableFeignBlockingLoadBalancerClient is created as wrapper over FeignClient and it's always trying to resolve external service host over Consul treating remote host as service ID.
I see the following warnings in log files constantly:
[WARN]: org.springframework.cloud.loadbalancer.core.RoundRobinLoadBalancer [RoundRobinLoadBalancer.java:97] - No servers available for service: some-host-address.com
[WARN]: org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient [RetryableFeignBlockingLoadBalancerClient.java:135] - Service instance was not resolved, executing the original request
Could you tell me please, is it expected behavior?
Usually I don't want to resolve external service host over Consul, especially when I already configured 'url' parameter of FeignClient as absolute URL.
I added a sample application to demonstrate the behavior described before.
spring-cloud release train version: 2020.0.1