Bird
0
0

You want to trigger a punctuator every minute but only if the stream time has advanced. Which scheduling approach should you use?

hard📝 Application Q8 of 15
Kafka - Advanced Stream Processing
You want to trigger a punctuator every minute but only if the stream time has advanced. Which scheduling approach should you use?
ASchedule with Duration.ofMinutes(1) and PunctuationType.STREAM_TIME.
BSchedule with Duration.ofMinutes(1) and PunctuationType.WALL_CLOCK_TIME.
CSchedule with Duration.ofSeconds(60) and PunctuationType.WALL_CLOCK_TIME.
DSchedule with Duration.ofSeconds(30) and PunctuationType.STREAM_TIME.
Step-by-Step Solution
Solution:
  1. Step 1: Understand requirement to trigger only if stream time advances

    This means the punctuator should trigger based on event time, not system clock.
  2. Step 2: Choose correct PunctuationType and interval

    Use PunctuationType.STREAM_TIME with Duration.ofMinutes(1) to trigger every minute of stream time advancement.
  3. Final Answer:

    Schedule with Duration.ofMinutes(1) and PunctuationType.STREAM_TIME. -> Option A
  4. Quick Check:

    Stream time triggers = PunctuationType.STREAM_TIME [OK]
Quick Trick: Use STREAM_TIME for event-time based triggers [OK]
Common Mistakes:
MISTAKES
  • Using WALL_CLOCK_TIME when stream time is needed
  • Mixing seconds and minutes inconsistently
  • Assuming WALL_CLOCK_TIME depends on stream time

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes