Bird
0
0

You wrote this code to schedule a punctuator but it never runs:

medium📝 Debug Q6 of 15
Kafka - Advanced Stream Processing
You wrote this code to schedule a punctuator but it never runs:
context.schedule(Duration.ofSeconds(10), PunctuationType.STREAM_TIME, punctuator);

What is the most likely reason?
ADuration.ofSeconds is not a valid method.
BNo new records are arriving to advance stream time.
CPunctuationType.STREAM_TIME is deprecated and ignored.
DThe punctuator callback is null.
Step-by-Step Solution
Solution:
  1. Step 1: Check STREAM_TIME trigger requirements

    STREAM_TIME punctuators trigger only when stream time advances, which requires new records.
  2. Step 2: Identify why punctuator never runs

    If no new records arrive, stream time does not advance, so the punctuator never triggers.
  3. Final Answer:

    No new records are arriving to advance stream time. -> Option B
  4. Quick Check:

    STREAM_TIME needs new records to trigger [OK]
Quick Trick: STREAM_TIME punctuators need record timestamps to advance [OK]
Common Mistakes:
MISTAKES
  • Assuming Duration.ofSeconds is invalid
  • Thinking STREAM_TIME is deprecated
  • Ignoring possibility of null callback

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes