Interface KafkaPublishTimestampFunction<T>

  • All Superinterfaces:
    java.io.Serializable

    public interface KafkaPublishTimestampFunction<T>
    extends java.io.Serializable
    An interface for providing custom timestamp for elements written to Kafka.
    • Method Detail

      • getTimestamp

        org.joda.time.Instant getTimestamp​(T element,
                                           org.joda.time.Instant elementTimestamp)
        Returns timestamp for element being published to Kafka. See @ProducerRecord.
        Parameters:
        element - The element being published.
        elementTimestamp - Timestamp of the element from the context (i.e. @DoFn.ProcessContext.timestamp()