Hi Elias,

Good question. The general answer is that each time a record is output, the 
timestamp is that of the current Kafka Streams task that processes it, so it's 
the internal Kafka Streams time. If the Kafka Streams task is processing 
records with event time, the timestamp at any point is the smallest among its 
input stream partition timestamps (see ProcessorContext.java, the timestamp() 
definition). 

This might sound complicated, but some examples should help: for output by 
stateless transformations the timestamp will be that of the record being 
transformed. For aggregations, the timestamp will be that of the latest record 
being aggregated.

Cheers
Eno


> On 10 Sep 2016, at 00:19, Elias Levy <fearsome.lucid...@gmail.com> wrote:
> 
> The Kafka Streams documentation discussed how to assign timestamps to
> records received from source topic via TimestampExtractor.  But neither the
> Kafka nor the Confluent documentation on Kafka Streams explain what
> timestamp is associated with a record that has been transformed.
> 
> What timestamp is associated with records that are output by stateless
> transformations like map or flatMap?
> 
> What timestamp is associated with records that are outputted by stageful
> transformations like aggregations or joins?
> 
> What about transformations on windows?
> 
> What timestamp does the Kafka publisher use, if any, when writing to an
> intermediate topic via through() or a sink via to()?

Reply via email to