Skip to content
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

WatchUpdate() listen namespaces has limits #21

Open
oldthreefeng opened this issue Jul 22, 2022 · 0 comments
Open

WatchUpdate() listen namespaces has limits #21

oldthreefeng opened this issue Jul 22, 2022 · 0 comments

Comments

@oldthreefeng
Copy link

we have situations. we get 50+ namespaces in apollo

func main() {
	        conf := GetApollConf(apolloId,"default", namespaces)
	        apolloClient := apollo.NewClient(conf)
		go func() {
			for changeEvent := range apolloClient.WatchUpdate() {
				log.Info("apollo : ", log.Reflect("change",changeEvent))
			}
		}()
}
func GetApollConf(appid, cluster string, namespaces []string) *apollo.Conf {
	addr := os.Getenv(apollo.ADDR)
	if appid == "" || len(namespaces) == 0 || addr == "" {
		return nil
	}
	return apollo.NewConf(appid, cluster, addr, "", namespaces)
}

if len(namespaces) > 50+( not exact), we cant watch any update from apollo changes.
when namespaces less then 50(not exact), we can watch. can anyone helps me to slove?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant