Closed UCSBGauchos closed 5 years ago
通过ConsumerConfig生成接口代理对象是支持并发调用和线程安全的,无需注册多个消费者, 注册多个反而占更多内存。
如果特殊情况一定要这样用,可调用 API: consumerConfig.setRepeatedReferLimit(-1)
通过 https://www.sofastack.tech/sofa-rpc/docs/Application-RPC-Config 配置文件进行配置 com.alipay.sofa.rpc.consumer.repeated.reference.limit # 允许客户端对同一个服务生成的引用代理数量,默认为3;
Your question
我在某一个rpc接口上注册了三个泛化调用消费者ConsumerConfig consumerConfig,报了这个错,有什么办法可以通过加参数来解决。
com.alipay.sofa.rpc.core.exception.SofaRpcRuntimeException: Duplicate consumer config with key bolt://XXX: has been referred more than 3 times! Maybe it's wrong config, please check it. Ignore this if you did that on purpose!
Your scenes
describe your use scenes (why need this feature)
Your advice
describe the advice or solution you'd like
Environment
java -version
):uname -a
):