You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "yxrxy (via GitHub)" <gi...@apache.org> on 2025/11/13 18:10:26 UTC
Re: [I] [BUG] dubbo-go3.3作为client在调用dubbo-go3.1的服务时有可能没有兼容接口级注册 [dubbo-go]
yxrxy commented on issue #3051:
URL: https://github.com/apache/dubbo-go/issues/3051#issuecomment-3529078246
需要在client也指定interface级别注册
```go
AddRegistry("zk", config.NewRegistryConfigBuilder().
SetProtocol("zookeeper").
SetTimeout("3s").
SetRegistryType("interface"). // 你在这指定了接口级注册
SetAddress(zkAddress).
Build(),
)
```
而客户端认使用**应用级发现**模式
你需要在:
```go
ins, err := dubbo.NewInstance(
dubbo.WithName("testDubbo3.3"),
dubbo.WithRegistry(
registry.WithZookeeper(),
registry.WithAddress(strings.Join(zkAddress, ",")),
registry.WithRegisterInterface(), // 指定接口级发现
),
)
```
--
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