You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/04 15:08:11 UTC

[GitHub] [dubbo] neocrm opened a new issue #8678: 服务注册时,动态追加参数

neocrm opened a new issue #8678:
URL: https://github.com/apache/dubbo/issues/8678


   同一个服务提供者;向zk注册三个实例;怎么在每个实例的URL中追加一个参数;便于后续区分三个实例,路由;
   例如,服务提供者统一用如下xml暴露服务:
   <dubbo:service interface="com.lance.service.HelloService" ref="helloService"/>
   
   那我想在zk上得到三个实例:
   dubbo://host:port/xxx?param=1
   dubbo://host:port/xxx?param=2
   dubbo://host:port/xxx?param=3
   这个怎么实现?


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] l42111996 commented on issue #8678: 服务注册时,动态追加参数

Posted by GitBox <gi...@apache.org>.
l42111996 commented on issue #8678:
URL: https://github.com/apache/dubbo/issues/8678#issuecomment-946508495


   我也正有类似的需求,现在在测试使用tag来区别,不用xml在springboot的配置里面加tag参数就解决,每个服务器都有特定标识,这个标识肯定在一个配置里面


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] zrlw commented on issue #8678: 服务注册时,动态追加参数

Posted by GitBox <gi...@apache.org>.
zrlw commented on issue #8678:
URL: https://github.com/apache/dubbo/issues/8678#issuecomment-912996539


   区分provider可以设置version、group或者tag,
   可能tag最适合你,provider静态设置tag,consumer动态设置tag调用不同的provider


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] neocrm commented on issue #8678: 服务注册时,动态追加参数

Posted by GitBox <gi...@apache.org>.
neocrm commented on issue #8678:
URL: https://github.com/apache/dubbo/issues/8678#issuecomment-913077820


   > 区分provider可以设置version、group或者tag,
   > 可能tag最适合你,provider静态设置tag,consumer动态设置tag调用不同的provider
   
   我理解你说的version,group,或者tag,都是 provider.xml 里面的一些静态的配置项;
   那么三个实例用的是同一份xml配置;那么它们注册的服务,group,version,tag都是一样的;就起不到区分的作用了;
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM commented on issue #8678: 服务注册时,动态追加参数

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #8678:
URL: https://github.com/apache/dubbo/issues/8678#issuecomment-924606566


   I don’t know if the above answers can solve your problem, please close the issue temporarily, if you have other questions, you can reopen the issue.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #8678: 服务注册时,动态追加参数

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #8678:
URL: https://github.com/apache/dubbo/issues/8678#issuecomment-914907391


   目前原生不支持这样的行为,可以用 placeholder 的方式进行注入


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM closed issue #8678: 服务注册时,动态追加参数

Posted by GitBox <gi...@apache.org>.
CrazyHZM closed issue #8678:
URL: https://github.com/apache/dubbo/issues/8678


   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org