vvcephei edited a comment on pull request #11854:
URL: https://github.com/apache/kafka/pull/11854#issuecomment-1060018286


   This is a functional prototype. It only adds processValues, which takes a 
supplier of a new type, FixedKeyProcessor. That processor only processes 
FixedKeyRecords, which have a key that cannot be changed. FixedKeyProcessors 
have a special context, a FixedKeyProcessorContext, which can only forward 
FixedKeyRecords.
   
   FixedKeyRecords have "fixed keys" because its key can only be set in the 
constructor, and its constructor is package-private.
   
   As you can see, this new record/processor/context ecosystem is an 
independent peer of the general one. This is necessary to ensure the desired 
compiler check. For example, if FixedKeyRecord were merely an interface 
implemented by Record, then users could create a new Record with a new key and 
forward it as a FixedKeyRecord, violating the constraint.
   
   Note: this prototype includes a new KStreamImplTest to demonstrate the 
functionality.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to