'Calling External/third-party URL via feignclient works, but results in warnings
I am trying to use feignclient to call a third party url (sending notifications to android devices)
@FeignClient(value = "external",url = "${android.notification.url}")
public interface AndroidNotificationClient {
@RequestMapping( method = RequestMethod.POST, consumes = "application/json")
String sendAndroidNotification(@RequestHeader("Authorization") String auth, @RequestHeader ("Sender") String sender,
@RequestBody String body);
}
"external" is not defined anywhere - I was told that value is not used for any purponse.
The API calls work, but I get warnings like
2022-05-10 07:52:17.015 WARN --- [boundedElastic-1] org.springframework.cloud.loadbalancer.core.RoundRobinLoadBalancer : No servers available for service: fcm.googleapis.com
2022-05-10 07:52:17.016 WARN --- [androidNotification8] org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient : Service instance was not resolved, executing the original request
The relevant portion of the properties file is reproduced below
feign.client.url=http://<our_domain_name>/api
android.notification.url=https://fcm.googleapis.com/fcm/send
android.authorization=key=xxxx
android.sender=id=xxxxx
eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://<our_domain_name>:<port>/eureka}
eureka.instance.preferIpAddress=true
What am I doing wrong which is resulting in such warnings, and how do I remove them?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
