...
Current state: Under Discussion
Discussion thread: Dev-list
JIRA: KAFKA-10732
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
I propose to introduce the
org.apache.kafka.common.Record
- new public interface. Expose information about Records to be added to the topic.org.apache.kafka.server.policy.RecordsPolicy
- new public interface. Implementation of this interface contains specific logic to check records to be added to the topic.records.policy.class.name: String -
Configuration option - sets class name of the implementation ofRecordsPolicy
for the specific topic.records.policy.enabled: Boolean
- Configuration option - enable or disable records policy for the topic
If records.policy.enabled
=true
than an instance of the RecordsPolicy
should check each Records
Record
batch before applying data to the log.
If PolicyViolationException
thrown thrown from the validate
methods methods then no data added to the log and the client receives an error.
...