Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-7909

AD482-39: RHT1753838 - Misleading auto commit explanation

XMLWordPrintable

    • 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).

              rht-jramirez Jaime Ramirez
              hchauhan@redhat.com Hemant Chauhan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: