Nov 2017 update: Kafka streams in Kafka 1.0 now support punctuate() both stream time and processing time (wall clock time). This way you can choose whatever behavior you prefer.
Your setup seems right to me.
What you need to know: with Kafka 0.10.0, the punctuate() method works in a time stream (by default, that is, based on the default time decoder, the time of the stream will mean an event-time). And the flow time only progressed when new data records appeared, and how much the flow time progresses is determined by the corresponding time stamps of these new records.
For instance:
- Suppose you set
punctuate() to call every 1 minute = 60 * 1000 (note: 1 minute of flow time). Now, if this happens when data is not received within the next 5 minutes, punctuate() will not be called at all - even if you can expect it to be called 5 times. What for? Again, since punctuate() depends on the stream time, and the stream time is only advanced based on the newly received data records.
Perhaps this causes the behavior you see?
Looking ahead: the Kafka project has already started discussing how to make punctuate() more flexible, for example. to run it not only based on stream-time (which is event-time by default), but also based on processing-time .
source share