One would expect that by changing the version, the previous behavior would remain the same. Well, it hasn’t. What has changed?
After each process method, a punctuate method is called. After punctuateInterval is scheduled, punctuate also occurs. This means the following:
- In the first test scenario, each “Arrived: message_<offset>” message in the console is accompanied with “Punctuate call”. Unsurprisingly, we have one: “Processed: 1” message in output topic. After ten messages, we have another: “Punctuate call” and “Processed: 0” pair.
- In the second scenario, we have nine: “Arrived: message_<offset>” and “Punctuate call” pairs on the console, followed with 9: “Processed: 1” in the output topic. After the pause and tenth message we have: “Arrived: message_<offset>” and 3 “Punctuate call”. In the output topic, we see “Processed: 1”, “Processed: 0”, and “Processed 0”.
Read the whole thing. This sort of behavioral change can be hard to suss out when testing a streaming application.