public interface KafkaPublishTimestampFunction<T>
extends java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
Instant |
getTimestamp(T element,
Instant elementTimestamp)
Returns timestamp for element being published to Kafka.
|
static <T> KafkaPublishTimestampFunction<T> |
withElementTimestamp()
Returns
KafkaPublishTimestampFunction returns element timestamp from ProcessContext. |
Instant getTimestamp(T element, Instant elementTimestamp)
ProducerRecord.element - The element being published.elementTimestamp - Timestamp of the element from the context (i.e. @DoFn.ProcessContext#timestamp()static <T> KafkaPublishTimestampFunction<T> withElementTimestamp()
KafkaPublishTimestampFunction returns element timestamp from ProcessContext.