Not sure if this applies to your case, but we run a managed Kafka Connect platform in our company, and rely extensively in the Connector#validate(Map<String, String> connectorConfigs) method to check that the user-supplied configuration is valid and, if it's not, we block the creation.
This of course only works before the connector has been created. I think the intention behind the validate(..) method is to check when the configuration is set or updated, not at runtime. From: [email protected] At: 11/12/25 07:08:51 UTC-5:00To: [email protected] Subject: Q: validating interdependent configuration options. I am working on several Connectors. I have cases where the value of one configuration option is dependent upon the value of another option. I have been unable to find a way to cleanly throw a ConfigException then an invalid set of properties is presented. I can use a validator to validate a single value. I can use a recommender to return a list of recommended values given a set of properties. But I can find no clean way to indicate an error in the configuration before or at startup of the connector. The only option I see is to override the ConfigDef.validate(Map<String, String>) method and call it when the connector start() is called. But I don't think that ConfigDef.validate() is supposed to throw any ConfigExceptions, just note their messages in the errorMessages instance variable. Is there a standard solution for this issue?
