public interface ConnectorClientConfigOverridePolicy extends org.apache.kafka.common.Configurable, AutoCloseable
Common use cases are ability to provide principal per connector, sasl.jaas.config
and/or enforcing that the producer/consumer configurations for optimizations are within acceptable ranges.
Kafka Connect discovers implementations of this interface using the Java ServiceLoader
mechanism.
To support this, implementations of this interface should also contain a service provider configuration file in
META-INF/services/org.apache.kafka.connect.connector.policy.ConnectorClientConfigOverridePolicy
.
Modifier and Type | Method and Description |
---|---|
List<org.apache.kafka.common.config.ConfigValue> |
validate(ConnectorClientConfigRequest connectorClientConfigRequest)
Workers will invoke this before configuring per-connector Kafka admin, producer, and consumer client instances
to validate if all the overridden client configurations are allowed per the policy implementation.
|
close
List<org.apache.kafka.common.config.ConfigValue> validate(ConnectorClientConfigRequest connectorClientConfigRequest)
If there are any policy violations, the connector will not be started.
connectorClientConfigRequest
- an instance of ConnectorClientConfigRequest
that provides the configs
to be overridden and its context; never null
ConfigValue
instances that describe each client configuration in the request and includes an
error
if the configuration is not allowed by the policy; never null