Search code examples
apache-kafkaapache-kafka-connectconfluent-platformdebezium

Wrong package reference for TopicNameMatches class in both Apache and Confluent kafka documentation


I tried the kafka connect transform predicate examples with debezium connector for MS SQL, and faced the issue with documentation for kafka connect. Examples in both documentations mention wrong org.apache.kafka.connect.predicates.TopicNameMatches, instead of the correct org.apache.kafka.connect.transforms.predicates.TopicNameMatches:

http://kafka.apache.org/documentation.html#connect_predicates https://docs.confluent.io/platform/current/connect/transforms/regexrouter.html#predicate-examples

    predicates=IsFoo
    
    predicates.IsFoo.type=org.apache.kafka.connect.predicates.TopicNameMatches
    predicates.IsFoo.pattern=foo

while in both distributions package is the same:

package org.apache.kafka.connect.transforms.predicates;

https://github.com/a0x8o/kafka/blob/master/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/predicates/TopicNameMatches.java https://github.com/confluentinc/kafka/blob/master/connect/transforms/src/main/java/org/apache/kafka/connect/transforms/predicates/TopicNameMatches.java

KIP for documentation improvement should then be issued for both?


Solution

  • You are correct: it's really mistake.

    For the Apache Kafka docs, I already made a fix, but don't know why it didn't apply (asked about it in the PR).

    Update. Fix will be applied in release 2.8