-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add command topic Deduplication(#246) #408
Conversation
- pulsarctl topics get-deduplication [topic] - pulsarctl topics set-deduplication [topic] -e - pulsarctl topics remove-deduplication [topic]
admin := cmdutils.NewPulsarClient() | ||
err = admin.Topics().SetDeduplicationStatus(*topic, enable) | ||
if err == nil { | ||
vc.Command.Printf("Set the deduplication policy successfully for [%s]\n", topic.String()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the enable
or disable
in the output?
var examples []cmdutils.Example | ||
msg := cmdutils.Example{ | ||
Desc: "Set the deduplication policy for a topic", | ||
Command: "pulsarctl topics set-deduplication topic ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the enable and the disable examples?
) | ||
|
||
func TestDeduplicationStatus(t *testing.T) { | ||
topicName := "persistent://public/default/test-deduplication-status-topic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a random suffix on the topic name? You can use the test.RandomSuffix()
Signed-off-by: limingnihao <limingnihao@live.com>
Add command topic Deduplication: