Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Topic deletion policies would enable operations operators to control which topics cannot be deleted even when request authorizer are allowed, e.g. deleting __consumer_offsets topic or application internal topics like Connect internal topics.


There has been related KIPs that included this proposal:

...

Code Block
languagejava
package org.apache.kafka.server.policy;

public interface DeleteTopicPolicy extends Configurable, AutoCloseable {

    class RequestMetadata {
        private final String topic;
        private final Uuid id; 

        public RequestMetadata(String topic, Uuid id) {
            this.topic = topic;
            this.id = id;
        }

        public String topic() {
            return topic;
        }

        public Uuid id() {
            return id;
        }
    }

    void validate(RequestMetadata requestMetadata) throws PolicyViolationException;

}

...