capabilities.work

Decommission a Topic

A 6-step recipe with Apache Kafka. We can help you get access.

Recipe · 6 steps

Decommission a Topic

Pre-flight a topic deletion against consumers and ACLs, then delete it.

  1. 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.
  2. Record the partition and replica layout before deletion, since it is the only detailed description of the topic that will survive it.
  3. List the consumer groups on the cluster so an active consumer of this topic can be found before its stream disappears underneath it.
  4. 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.
  5. Delete the topic. This destroys every record it holds across all partitions and cannot be undone.
  6. 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.