-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when set clusters for subscribe not trigger callback #761
Comments
Check if cluster-A cluster exists in nacos server |
I met the same situation, subscribe is not working when clusters was set. |
@tureo It works well with nacos server v2.4.1. But not work with v2.0.2 and v2.1.0. |
@youzhixiaomutou Thank you, our Nacos server version cannot be upgraded, so our temporary solution is to temporarily not set the cluster value |
@binbin0325 Yes, I am certain that cluster-a exists in Nacos, and here are some details and solutions for reproducing it |
What version of nacos-sdk-go are you using?
v2.2.6
What version of nacos-sever are you using?
v2.0.2
What version of Go are you using (
go version
)?go version go1.22.2 linux/amd64
What operating system (Linux, Windows, …) and version?
linux,uos
What did you do?
If possible, provide a recipe for reproducing the error.
when set clusters for subscribe callback not trigger
nacos-sdk-go/example/service/main.go
Line 149 in 61ecaa8
//Subscribe key=serviceName+groupName+cluster
//Note:We call add multiple SubscribeCallback with the same key.
subscribeParam := &vo.SubscribeParam{
ServiceName: "demo.go",
GroupName: "group-a",
Clusters: []string{"cluster-a"}, // this set clusters bug
SubscribeCallback: func(services []model.Instance, err error) {
fmt.Printf("callback return services:%s \n\n", util.ToJsonString(services))
},
}
subscribe(client, subscribeParam)
What did you expect to see?
callback trigger
What did you see instead?
callback not trigger
The text was updated successfully, but these errors were encountered: