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

普通消费下如何保证一个 topic 下多个 partition 能够均等的获得消息? #140

Open
WeiFrank opened this issue Jun 21, 2020 · 2 comments

Comments

@WeiFrank
Copy link

看到代码中生产者如果不指定partition id 的话在 nsqd server 这边进行 PUB 处理时会获取默认的 partition id ,这个默认 partition id 是通过 topicMap 字典中迭代出来的,虽然 golang 中字典是无序的,但是均衡性也不能保证。

@absolute8511
Copy link
Collaborator

看到代码中生产者如果不指定partition id 的话在 nsqd server 这边进行 PUB 处理时会获取默认的 partition id ,这个默认 partition id 是通过 topicMap 字典中迭代出来的,虽然 golang 中字典是无序的,但是均衡性也不能保证。

是生产方来做的, sdk发到不同的节点的不同分区.

@WeiFrank
Copy link
Author

好的,了解了。

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

2 participants