Skip to content

Add topic command terminate - #73

Merged
wolfstudy merged 7 commits into
masterfrom
topic_terminate
Oct 11, 2019
Merged

Add topic command terminate#73
wolfstudy merged 7 commits into
masterfrom
topic_terminate

Conversation

@zymap

@zymap zymap commented Sep 24, 2019

Copy link
Copy Markdown
Member
USED FOR:
    This command is used for terminating a non-partitioned topic and not allow any more messages to be published.

REQUIRED PERMISSION:
    This command requires tenant admin permissions.

EXAMPLES:
    #Terminate a non-partitioned topic <topic-name> and not allow any messages to be published
    pulsarctl topic terminate <topic-name>

OUTPUT:
    #normal output
    Topic <topic-name> successfully terminated at <message-id>

    #the topic name is not specified
    [✖]  only one argument is allowed to be used as a name

    #the specified topic does not found
    [✖]  code: 404 reason: Topic not found

    #the specified is a partitioned topic
    [✖]  code: 405 reason: Termination of a partitioned topic is not allowed

    #the topic name is not in the format of <tenant>/<namespace>/<topic> or <topic>
    [✖]  Invalid short topic name '<topic-name>', it should be in the format of <tenant>/<namespace>/<topic> or <topic>

    #the topic name is not in the format of <domain>://<tenant>/<namespace>/<topic>
    [✖]  Invalid complete topic name '<topic-name>', it should be in the format of <domain>://<tenant>/<namespace>/<topic>

    #the topic name is not in the format of <tenant>/<namespace>/<topic>
    [✖]  Invalid topic name '<topic-name>', it should be in the format of<tenant>/<namespace>/<topic>

    #the namespace name is not in the format of <tenant>/<namespace>
    [✖]  The complete name of namespace is invalid. complete name : <namespace-complete-name>

    #the tenant name and(or) namespace name is empty
    [✖]  Invalid tenant or namespace. [<tenant>/<namespace>]

    #the tenant name contains unsupported special chars. the alphanumeric (a-zA-Z0-9) and the special chars (-=:.%)  is allowed
    [✖]  Tenant name include unsupported special chars. tenant : [<namespace>]

    #the namespace name contains unsupported special chars. the  alphanumeric (a-zA-Z0-9) and the special chars (-=:.%) is allowed
    [✖]  Namespace name include unsupported special chars. namespace : [<namespace>]

Usage: pulsarctl topics terminate [flags]

*Motivation*

- Add command `terminate`
@zymap
zymap requested a review from sijie September 24, 2019 09:50
@zymap zymap self-assigned this Sep 24, 2019
Comment thread pkg/ctl/topic/errors/errors_topic.go Outdated
Comment thread pkg/ctl/topic/terminate/teminate.go Outdated
Comment thread pkg/ctl/topic/terminate/teminate.go Outdated
Comment thread pkg/ctl/topic/terminate/teminate.go Outdated
Comment thread pkg/ctl/topic/terminate/teminate.go Outdated
Comment thread pkg/ctl/topic/terminate/teminate.go Outdated
@zymap

zymap commented Oct 9, 2019

Copy link
Copy Markdown
Member Author

@sijie PTAL. Thanks.

@sijie

sijie commented Oct 10, 2019

Copy link
Copy Markdown
Member

@zymap please rebase this pull request

@zymap

zymap commented Oct 10, 2019

Copy link
Copy Markdown
Member Author

@sijie ok

@wolfstudy
wolfstudy merged commit 83319ee into master Oct 11, 2019
@wolfstudy
wolfstudy deleted the topic_terminate branch October 11, 2019 06:22
@sijie sijie mentioned this pull request Oct 11, 2019
29 tasks
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
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

Successfully merging this pull request may close these issues.

3 participants