dpcollins-google commented on issue #23527: URL: https://github.com/apache/beam/issues/23527#issuecomment-1292645469
Hello, I believe this can be resolved with comparable fidelity to kafkaIO's TimestampPolicy constructs in userland without pushing this down into the source. To that end, I've authored #23861, which should allow you to remap your data to the event time domain by doing: ``` PCollection<SequencedMessage> messages = p.apply(PubsubLiteIO.read(...)); PCollection<SequencedMessage> remapped = messages.apply(WithTimestamps.of(m -> Instant.ofEpochMillis(Timestamps.toMillis(m.message()))).withWatermarkDelay(Duration.ofStandardSeconds(10))); ``` If this doesn't get merged, I will implement the equivalent of KafkaIO's TimestampPolicy in the source. -Daniel -- 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]
