ReplicationControlManager build() {
            if (configurationControl == null) {
                throw new IllegalStateException("Configuration control must be set before building");
            } else if (clusterControl == null) {
                throw new IllegalStateException("Cluster control must be set before building");
            }
            if (logContext == null) logContext = new LogContext();
            if (snapshotRegistry == null) snapshotRegistry = configurationControl.snapshotRegistry();
            if (featureControl == null) {
                throw new IllegalStateException("FeatureControlManager must not be null");
            }
            return new ReplicationControlManager(snapshotRegistry,
                logContext,
                defaultReplicationFactor,
                defaultNumPartitions,
                defaultMinIsr,
                maxElectionsPerImbalance,
                eligibleLeaderReplicasEnabled,
                configurationControl,
                clusterControl,
                createTopicPolicy,
                featureControl,
                // AutoMQ for Kafka inject start
                quorumController
                // AutoMQ for Kafka inject end
            );
        }
The ReplicationControlManager is the part of the controller which deals with topics
and partitions. It is responsible for managing the in-sync replica set and leader
of each partition, as well as administrative tasks like creating or deleting topics.
metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java