Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/2369
  
    Thanks Robert for addressing my comments :)
    
    Overall, I like the new hybrid producer approach. However, I'm still 
curious whether or not it is possible / reasonable to drop the 
`FlinkKafkaProducer010Configuration` return type of invocation (b), and let 
both invocation methods return `FlinkKafkaProducer010` instead. So,
    
    ```
    FlinkKafkaProducer010 kafka = new FlinkKafkaProducer010(...)
    // or FlinkKafkaProducer010 kafka = 
FlinkKafkaProducer010.writeToKafkaWithTimestamps(...) for timestamp support
    
    // setter config methods directly done on the FlinkKafkaProducer010 
instance regardless of (a) or (b)
    kafka.setLogFailuresOnly(true)
    kafka.setFlushOnCheckpoint(true)
    kafka.setWriteTimestampToKafka(true) // would not have effect if original 
invocation method (a) was used
    ```
    
    But we'll need to be bit hacky in `invokeInternal(element, 
elementTimestamp)`, something like only letting the given `timestamp` to 
`ProducerRecord` be non-null if `writeTimestampToKafka && elementTimestamp != 
Long.MIN_VALUE`.
    
    What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to