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/11/28 09:55:21 UTC

[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #1616: nacos support UnRegister and UnSubscribe

AlexStocks commented on a change in pull request #1616:
URL: https://github.com/apache/dubbo-go/pull/1616#discussion_r757871267



##########
File path: registry/nacos/registry.go
##########
@@ -213,8 +209,37 @@ func (nr *nacosRegistry) Subscribe(url *common.URL, notifyListener registry.Noti
 }
 
 // UnSubscribe :
-func (nr *nacosRegistry) UnSubscribe(url *common.URL, notifyListener registry.NotifyListener) error {
-	return perrors.New("UnSubscribe not support in nacosRegistry")
+func (nr *nacosRegistry) UnSubscribe(url *common.URL, _ registry.NotifyListener) error {
+	param := createSubscribeParam(url, nr.URL, nil)
+	if param == nil {
+		return nil
+	}
+	err := nr.namingClient.Client().Unsubscribe(param)
+	if err != nil {
+		return perrors.New("UnSubscribe [" + param.ServiceName + "] to nacos failed")

Review comment:
       @zhaoyunxing92 没看到改进的必要。sanxun 现在的实现没啥问题哦




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