jockercheng91 commented on issue #15710:
URL: https://github.com/apache/dubbo/issues/15710#issuecomment-3345143962

   What is the difference between the configurations:
   
dubbo.protocols.dubbo.name=dubbodubbo.protocols.dubbo.port=50052dubbo.protocols.dubbo.dispatcher=messagedubbo.protocols.dubbo.threads=500dubbo.protocols.dubbo.ext-protocol=tri,
   and
   
dubbo.protocol.name=dubbodubbo.protocol.port=50052dubbo.protocol.dispatcher=messagedubbo.protocol.threads=500dubbo.protocol.ext-protocol=tri,
   Why does an exception occur when using dubbo.protocols.dubbo.xxx? In the 
source code(ConfigManager):
   public ProtocolConfig getOrAddProtocol(String idOrName) 
{Optional<ProtocolConfig> protocol = getProtocol(idOrName);if 
(protocol.isPresent()) {return protocol.get();}
   // Avoiding default protocol configuration overriding custom protocol 
configuration// due to getOrAddProtocol being called when they are not 
loadedidOrName = idOrName + ".default";protocol = getProtocol(idOrName);if 
(protocol.isPresent()) {return protocol.get();}
   ProtocolConfig protocolConfig = addConfig(new ProtocolConfig(idOrName));
   // addProtocol triggers refresh when other protocols exist in the 
ConfigManager.// so refresh is only done when ProtocolConfig is not 
refreshed.if (!protocolConfig.isRefreshed()) {protocolConfig.refresh();}return 
protocolConfig;}
   The ".default" suffix was added to resolve conflicts with custom protocols. 
Why is the native protocol not found then?


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to