delete
Delete an Apache Pulsar object.
Synopsis
delete <DeleteCommandArg> [DeleteCommandArg Options>]
delete bookie-rack
delete bookie-rack <Cluster> bookie <Bookie>
Remove the rack-placement information for a bookie.
delete cluster
delete cluster <Cluster> [in <Cluster>] [force]
Delete a cluster.
delete namespace
delete namespace <Namespace> [force]
Delete a namespace. The path can either be absolute, or relative to the current directory.
Example:
/instance1/cluster1/tenant1> delete namespace namespace1
delete schemas
delete schemas <Topic> [force]
Delete a schema definition associated with a topic.
delete subscription
delete subscription <Subscription> [force]
Delete a subscription. The path can be absolute or relative to the current directory.
Examples:
Deleting a subscription is essentially the same as creating one, except specifying the starting message is not required.
Absolute path, persistent topic:
/> delete subscription /instance1/cluster1/tenant1/namespace1/topic1/sub1
/> delete subscription persistent://instance1/cluster1/tenant1/namespace1/topic1/sub1
Relative path, persistent topic from the topic directory:
/instance1/cluster1/tenant1/namespace1/topic1> delete subscription sub1
delete tenant
delete tenant <Tenant> [force]
Delete a tenant. The path can be absolute or relative to the current directory.
Example:
/> delete tenant /instance1/cluster1/tenant1
delete topic
delete topic <Topic> [force|delete-schema]
Delete a topic/partitioned-topic. Optionally you can also delete the schema associated with this topic. This single command handles partitioned or non-partitioned topics in the same manner. The path can be absolute or relative to the current directory.
Examples:
Deleting a topic is essentially the same as creating one, except specifying the partitions of a partitioned topic is not required.
Absolute path, persistent, non-partitioned topic:
/> delete topic /instance1/cluster1/tenant1/namespace1/topic1
/> delete topic persistent://instance1/cluster1/tenant1/namespace1/topic1
Absolute path, non-persistent, non-partitioned topic:
/> delete topic non-persistent://instance1/cluster1/tenant1/namespace1/topic1
Relative path, persistent, partitioned topic from the namespace directory:
/instance1/cluster1/tenant1/namespace1> delete topic topic1