[ 
https://issues.apache.org/jira/browse/SCB-474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444037#comment-16444037
 ] 

ASF GitHub Bot commented on SCB-474:
------------------------------------

zhengyangyong commented on a change in pull request #658: [SCB-474] add 
endpoint filter (only rest endpoints) for zuul integration
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/658#discussion_r182740480
 
 

 ##########
 File path: 
spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/ServiceCombServerList.java
 ##########
 @@ -49,13 +49,11 @@ public ServiceCombServerList() {
         RegistryUtils.getAppId(),
         serviceId,
         DefinitionConst.VERSION_RULE_ALL);
-    Map<String, MicroserviceInstance> servers = serversVersionedCache.data();
-    List<Server> instances = new ArrayList<>(servers.size());
-    for (MicroserviceInstance s : servers.values()) {
-      for (String endpoint : s.getEndpoints()) {
-        URIEndpointObject uri = new URIEndpointObject(endpoint);
-        instances.add(new Server(uri.getHostOrIp(), uri.getPort()));
-      }
+    ArrayList<Endpoint> endpoints = serversVersionedCache.data();
 
 Review comment:
   got it

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> 使用zuul做网关进行路由,当同一个微服务接口同时开放rest和highway方式时,出现无法调用情况。
> ----------------------------------------------------
>
>                 Key: SCB-474
>                 URL: https://issues.apache.org/jira/browse/SCB-474
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>    Affects Versions: java-chassis-1.0.0-m1
>            Reporter: zhousujan
>            Assignee: yangyongzheng
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m2
>
>
> 使用zuul做网关进行路由,当同一个微服务接口同时开放rest和highway方式时,出现无法调用情况。经过定位,发现zuul能够把同一个微服务暴露的两种接入方式都获取到一个服务列表中,zuul默认使用轮询的方式进行路由,当轮询到rest方式时,能够正常调用;轮询到highway的地址时,必定报错。



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to