azagrebin commented on a change in pull request #6615: [FLINK-8354] 
[flink-connectors] Add ability to access and provider Kafka headers
URL: https://github.com/apache/flink/pull/6615#discussion_r249478973
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/util/serialization/KeyedDeserializationSchema.java
 ##########
 @@ -32,6 +34,49 @@
  */
 @PublicEvolving
 public interface KeyedDeserializationSchema<T> extends Serializable, 
ResultTypeQueryable<T> {
+       /**
+        * Kafka record to be deserialized.
+        * Record consists of key,value pair, topic name, partition offset, 
headers and a timestamp (if available)
+        */
+       interface Record {
 
 Review comment:
   kafka-clients 0.8 actually has `ConsumerRecord`, just `SimpleConsumerThread` 
does not use it but it seems to be possible to manually wrap `MessageAndOffset` 
into that `ConsumerRecord`. I would give it a try. It seems to be simpler 
option at the moment and would eliminate currently introduced inheritance for 
the sake of wrapping.
   
   Not sure, though, how big the risk is that the Kafka API changes again. The 
Flink wrapping, as now, seems to be a safer option but it also adds some 
performance overhead.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to