Coder Social home page Coder Social logo

Comments (1)

zhaozw avatar zhaozw commented on August 17, 2024

简单说一下问题和解决思路:
RegistrationListener.processNewSubscriberEvent方法会查找泛化调用的微服务,泛化访问的URL如下
consumer://10.69.34.249/org.apache.dubbo.rpc.service.GenericService?application=cse-v2-consumer&category=providers,configurators,routers&check=false&dubbo=2.0.2&generic=true&init=false&interface=com.huaweicloud.api.ProviderService&pid=17396&release=2.7.15&side=consumer&sticky=false&timestamp=1645405274320
但是这里面是找不到的,这个泛化其实是和interface参数的微服务一一对应的,此处是com.huaweicloud.api.ProviderService

RegistrationListener.instancesToURLs方法里面会根据schemaInfos向notifyUrls里面添加key,value(是个URL列表),这里如果不添加org.apache.dubbo.rpc.service.GenericService,后面泛化调用的时候找不到对应的org.apache.dubbo.rpc.Invoker,所以这里也要做处理,
每个schema都额外针对泛化做一次处理,value列表里面的URL值类似如下:
dubbo://10.69.34.249:8085/com.huaweicloud.api.ProviderService?anyhost=true&application=cse-v2-provider&deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=com.huaweicloud.api.ProviderService&methods=sayHello&pid=18408&release=2.7.15&service.name=ServiceBean:/com.huaweicloud.api.ProviderService&side=provider&timestamp=1644565441839

测试场景,用了2个GenericService,这两个泛化都是由一个服务器的provider提供的,又测试一下从consumer调用2个不同的provider的GenericService,都正常通过测试

from dubbo-servicecomb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.