debezium + schema registry 테스트를 하는 중에

The retention policy of the schema topic is incorrect 라는 에러가 갑자기 발생했다. 

이유는 정확치 않았지만. kafka replication이 제대로 동작안되면 문제가 발생할 수 있다. 


The retention policy of the schema topic " + topic + " is incorrect. "
                + "You must configure the topic to 'compact' cleanup policy to avoid Kafka "
                + "deleting your schemas after a week. "
                + "Refer to Kafka documentation for more details on cleanup policies"

https://github.com/confluentinc/schema-registry/blob/master/core/src/main/java/io/confluent/kafka/schemaregistry/storage/KafkaStore.java#L262 코드를 보면. 아래 조건에 해당되면 에러를 발생한다


if (retentionPolicy == null || !TopicConfig.CLEANUP_POLICY_COMPACT.equals(retentionPolicy)) {
..

}



topic마다 config를 확인해봐야 한다. 
https://docs.confluent.io/current/installation/configuration/topic-configs.html

 

 

Posted by '김용환'
,