hi Sid

1. You can customize KafkaDeserializationSchema[1], in the `deserialize`
method, you can obtain the Kafka event time.

2.  I don't think it's necessary to explicitly mention the watermark
strategy.


[1].
https://nightlies.apache.org/flink/flink-docs-master/api/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchema.html
[2].
https://nightlies.apache.org/flink/flink-docs-release-1.13/docs/connectors/datastream/kafka/#the-deserializationschema


best,
Feng


On Sat, Sep 9, 2023 at 7:25 PM Sid <flinkbyhe...@gmail.com> wrote:

> Hello experts,
>
> My source is Kafka and I am trying to generate records for which I have
> FlinkKafkaConsumer class.
>
> Now my first question is how to consume an event timestamp for the records
> generated.
> I know for a fact that for CLI, there is one property called
> *print.timestamp=true* which gives you epoch creation time but not sure
> how to do it programmatically.
>
> The second question is since my processing won't be based on the event
> timestamp (but there is a need to append it to the records) do I need to
> explicitly mention WatermarkStrategy.noWatermarks()?
>
> TIA,
> P
>

Reply via email to