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添加额外的partionNumber #5

Open
caibirdme opened this issue Jan 4, 2021 · 2 comments
Open

为什么给topic添加额外的partionNumber #5

caibirdme opened this issue Jan 4, 2021 · 2 comments

Comments

@caibirdme
Copy link

订阅的是topic是"foo",但是收到的message:

msg.Topic == "foo-partition-0"

这样我都没办法对topic进行switch case了…

swtich msg.Topic {
  case "foo":
    doFoo(msg)
  case "bar":
    doBar(msg)
  default:
    doOther(msg)
}
@edocevol
Copy link

通过分区来提高吞吐率的

@caibirdme
Copy link
Author

通过分区来提高吞吐率的

我的意思是,msgID里已经包含了分区信息了,Topic里再包含partition似乎没太大意义,而且还造成了额外的负担,消费时想针对不同topic进行处理还得做字符串切分

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