gougouzcm opened a new issue #1552: How can I add a custom param(SPI) when 
zookeeperRegistry register url on zk
URL: https://github.com/apache/incubator-dubbo/issues/1552
 
 
   the similar issue is 
[#1367](https://github.com/apache/incubator-dubbo/issues/1367) but I didn't get 
solution  from it.
   I need to  write a custom router for dubbo AB test( not the group lable  in 
xml  )
   I notice that 
[AbstractDirectory.java](https://github.com/apache/incubator-dubbo/blob/master/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/directory/AbstractDirectory.java)
   In the method 
   
   ```
   
   1. protected void setRouters(List<Router> routers) {
   2.         // copy list
   3.         routers = routers == null ? new ArrayList<Router>() : new 
ArrayList<Router>(routers);
   4.         // append url router
   5.         String routerkey = url.getParameter(Constants.ROUTER_KEY);
   6.         if (routerkey != null && routerkey.length() > 0) {
   7.             RouterFactory routerFactory = 
ExtensionLoader.getExtensionLoader(RouterFactory.class).getExtension(routerkey);
   8.             routers.add(routerFactory.getRouter(url));
   9.         }
   10.         // append mock invoker selector
   11.         routers.add(new MockInvokersSelector());
   12.         Collections.sort(routers);
   13.         this.routers = routers;
   14.     }
   
   ```
   
   
    It will add some additional router ( I mean not from category routers but 
from from registry url) 。I don't want add a router in dubbo-admin-web for every 
Interface, I want a global setting 
   like filter or balance  lable such as `<dubbo:consumer filter="traceFilter" 
loadbalance=" ***** "></dubbo:consumer>`   OR  I has some ways to add a param 
&router=myRouter& in registry url  。
   
   
   
   can anyone help me , thx。
   
   

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


With regards,
Apache Git Services

Reply via email to