Decommission a Topic
A 6-step recipe with Apache Kafka. We can help you get access.
Recipe · 6 steps
Decommission a Topic
with Apache Kafka
Pre-flight a topic deletion against consumers and ACLs, then delete it.
- Confirm the topic exists and record its partitioning and replication for the decommission record. An internal topic showing up here is a signal to stop, because deleting one breaks the cluster itself.
- Record the partition and replica layout before deletion, since it is the only detailed description of the topic that will survive it.
- List the consumer groups on the cluster so an active consumer of this topic can be found before its stream disappears underneath it.
- Surface the ACLs bound to topic resources on the cluster so the grants left behind by this topic are known and can be cleaned up deliberately.
- Delete the topic. This destroys every record it holds across all partitions and cannot be undone.
- List the cluster's topics to confirm the deletion took effect rather than assuming it from the 204.
What you'll need to have ready
- clusterId: The Kafka cluster id holding the topic.
- topicName: The topic to decommission.
For your developer
Arazzo workflow apache-kafka:decommission-topic, 6 operations: getTopic → listPartitions → listConsumerGroups → searchAcls → deleteTopic → listTopics. Specs on APIs.io.