pigbayspy opened a new issue #2647:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2647


   微服务 A 调用另一个微服务 B 时,微服务 A 如何获取 B 的版本号?
   尝试调用 Invocation 的 getMicroserviceVersionRule() 方法 , 结果是 `0.0.0.0+`
   使用场景如下:
   
   ```java
   @Subscribe
       public void consume(InvocationFinishEvent event) {
           if (event == null) {
               log.error("event is null");
               return;
           }
           Invocation invocation = event.getInvocation();
           Response response = event.getResponse();
           if (invocation == null || response == null) {
               log.error("invocation or response is null");
               return;
           }
           if (InvocationType.CONSUMER.equals(invocation.getInvocationType())) {
               // How to get provider service version?
           }
   }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to