lhotari commented on a change in pull request #9448:
URL: https://github.com/apache/pulsar/pull/9448#discussion_r585524925
##########
File path:
pulsar-io/kafka/src/main/java/org/apache/pulsar/io/kafka/KafkaAbstractSource.java
##########
@@ -151,18 +153,32 @@ public void start() {
runnerThread.start();
}
- public abstract V extractValue(ConsumerRecord<String, byte[]> record);
+ public Object extractValue(ConsumerRecord<Object, Object> consumerRecord) {
+ return consumerRecord.value();
+ }
+ public Optional<String> extractKey(ConsumerRecord<Object, Object>
consumerRecord) {
+ // we are currently supporting only String keys
+ return Optional.ofNullable((String) consumerRecord.key());
Review comment:
since the key is always a String, would it make sense to set that
already in the ConsumerRecord type parameter?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]