You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/04/17 05:15:22 UTC

[GitHub] [servicecomb-java-chassis] jerome2018 opened a new issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?

jerome2018 opened a new issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1716
 
 
   在RPC开发模式下,微服务之间相互调用时,客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1716#issuecomment-615113740
 
 
   不可以的。 不同的微服务允许一样的 schemaID。 在不知道微服务名称的情况下, 可以考虑使用 RestTemplate 访问, 通常 URL 在规划的时候, 是唯一的。
   
   当然如果可以假设 schemaID 是全局唯一的, 可以使用 DiscoveryTree/RegistryUtils遍历所有微服务元数据,找到包含schemaID的微服务, 具体处理过程涉及到一些非公开API使用,你可以看下源码。

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1716#issuecomment-615113740
 
 
   不可以的。 不同的微服务允许一样的 schemaID。 在不知道微服务名称的情况下, 可以考虑使用 RestTemplate 访问。

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1716#issuecomment-615113740
 
 
   不可以的。 不同的微服务允许一样的 schemaID。 
   
   当然如果可以假设 schemaID 是全局唯一的, 可以使用 DiscoveryTree/RegistryUtils遍历所有微服务元数据,找到包含schemaID的微服务, 具体处理过程涉及到一些非公开API使用,你可以看下源码。(不过这样也有潜在问题, 因为一个 consumer 在没有访问一个微服务的情况下,本地不会查询这个微服务的元数据。如果把所有的微服务数据从服务中心查询下来,这个也是不推荐的)

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


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #1716: 客户端采用InvokeUtil调用服务接口时,是否能通过目标服务的schemeId获取到microserviceName?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1716#issuecomment-615113740
 
 
   不可以的。 不同的微服务允许一样的 schemaID。 在不知道微服务名称的情况下, 可以考虑使用 RestTemplate 访问, 通常 URL 在规划的时候, 是唯一的。

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


With regards,
Apache Git Services