-
Story
-
Resolution: Done
-
Major
-
AD482 - RHAMQS1.8-en-4-20220523
-
None
-
6
-
en-US (English)
URL: https://rol.redhat.com/rol/app/courses/ad482-1.8/pages/ch06s05
Reporter RHNID: hchauhan@redhat.com
Section: 5 - Preventing Duplication and Data Loss
Language: en-US (English)|||||||||
Workaround:
Description: The chapter "Preventing Duplication and Data Loss" and the subsequent guided exercise implicitly state that the auto commit is happening in a thread independent of poll() thread. Actually this is not the case because the auto commit period is just a lower bound and the offset commit cannot happen between two poll() invocations.
For example Figure 6.6 is not correct as only records from previous poll() calls can be committed by the current poll() invocation.
The same is true for the guided exercise. It is not made clear enough that the reason the record causing application crash is committed is not that auto commit is executed on regular intervals. The real reason is that in the exercise the processing loop just fires an async operation and exits immediately. Because of this four records are actually read from the topic before the application crashes (if the async operation was slower even all five records could have been committed before the crash).