pulsarctl
                                
                                 pulsarctl copied to clipboard
                                
                                    pulsarctl copied to clipboard
                            
                            
                            
                        [Discuss] pulsarctl should use "--non-partitioned" instead of "partitioned" for topic as default type
pulsarctl won't delete a normal topic unless given --non-partioned flag:
$ ./pulsarctl topic delete persistent://public/default/temp
[✖]  code: 404 reason: Partitioned topic does not exist
$ ./pulsarctl topic delete --non-partitioned persistent://public/default/temp
Delete topic persistent://public/default/temp successfully
However, pulsar-admin does not need to be told this.
$ apache-pulsar-2.4.1/bin/pulsar-admin topics delete persistent://public/default/temp
$ 
Hi @candlerb .
In pulsar-admin, there are two commands to delete topics. bin/pulsar-admin delete-partitioned-topic is used to delete partitioned topic and bin/pulsar-admin delete is used to delete non-partitioned-topic.
I integrate them in Pulsarctl as one command, so you need to specify the topic type to delete it.
Thanks.
pulsar-admin chooses the shorter command for normal (non-partitioned) topics.
Perhaps pulsarctl could make this the default and have a --partitioned flag instead?
@candlerb Thank you for your advice. Do you want to send out a pull request to propose a change?
Probably no time. Likely switching to Kafka.
As discussed above, This is a request to replace the default type for topic delete from partitioned to non-partioned. In Pulsar usage, partitioned topic is used more often, would like to keep this behavior. Would like to close this issue.
In Pulsar usage, partitioned topic is used more often, would like to keep this behavior.
- 
Perhaps that's true for your usage, but I don't think it applies in general. One of the main plus points of Pulsar over Kafka is that it doesn't require topics to be partitioned, even to share load amongst consumers in a group. You only need to partition for very high throughput, when the broker itself becomes the bottleneck. 
- 
The behaviour of pulsar-admin is to work with non-partitioned topics by default. In my opinion, it adds confusion if pulsarctl behaves differently to pulsar-admin. 
The documentation says:
Partitioned topics are a special type of topic
(my emphasis: implies they are not the normal case)
Partitioned topics need to be explicitly created via the admin API.
(whereas normal topics are created dynamically on demand, which is what the example use cases show)
@candlerb
One of the main plus points of Pulsar over Kafka is that it doesn't require topics to be partitioned, even to share load amongst consumers in a group.
I agree with you, pulsar support non-partitioned topic.
You only need to partition for very high throughput.
Normally, it is hard to do a predicate for the future throughput of topic at the create time. So a default partitioned topic would avoid the switch, which is not supported yet, in the future once it require the high throughput.
If you don't agree to close this. we could let it open. and If more user want to use non-partioned topic as default, they could +1 for this issue.
also change the issue title to make it clear.