...
No such validation functionality exists for the options of single message transforms (SMTs, KIP-66) and SMT predicates (KIP-585). I.e. the only way for a user to learn about invalid SMT-related configuration is to register a connector with that SMT. This KIP aims at providing validation functionality for SMTs, e.g. benefitting tools like UIs and CLIs interacting with Kafka Connect which can inform the user about invalid SMT configuration early on.
Public Interfaces
A method default Config validate(Map<String, String> smtConfigs)
will be added to the org.apache.kafka.connect.transforms.Transformation
interface.
A method default Config validate(Map<String, String> predicateConfigs)
will be added to the org.apache.kafka.connect.transforms.predicates.Predicate
interface.
The implementation of the existing REST API method PUT /connector-plugins/(string: name)/config/validate
will be expanded so that it invokes the validate() method for all SMTs and predicates specified in the given connector configuration and returns any validation errors as part of the existing response type structure.
Proposed Changes
The following method (inspired by the existing org.apache.kafka.connect.connector.Connector.validate(Map<String, String>)
method) will be added to the interface org.apache.kafka.connect.transforms.Transformation
:
...