Spring-cloud-netflix: mixed eureka/non-eureka based service usage

Created on 30 May 2017  路  5Comments  路  Source: spring-cloud/spring-cloud-netflix

It works well when I just set ribbon.eureka.enabled=false and config all my service using xxx.ribbon.listOfServers .

And I want eureka based services can be auto discovered. So when I comment out ribbon.eureka.enabled=false and config non-eureka based service using xxx.ribbon.eureka.enabled=false and xxx.ribbon.listOfServers, it won`t work as expected.

Is there any references on how to use @feginclient when some of yours services are eureka based and others are static url based services?

thx~

question

Most helpful comment

You can set xxx.ribbon.NIWSServerListClassName=com.netflix.loadbalancer.ConfigurationBasedServerList then for xxx, listOfServers will work.

All 5 comments

I dont think xxx.ribbon.eureka.enabled=false is valid. You can specify a URL in your @FeignClient annotation.

You can set xxx.ribbon.NIWSServerListClassName=com.netflix.loadbalancer.ConfigurationBasedServerList then for xxx, listOfServers will work.

Ok, it works well 馃憤
Thanks @spencergibb

@spencergibb
I think it's
xxx.ribbon.NIWSServerListClassName=com.netflix.loadbalancer.ConfigurationBasedServerList.
Did you miss a point?

@eacdy yes, a point is missing, but I get the point. Thx~

Was this page helpful?
0 / 5 - 0 ratings