Kafka
  1. Kafka
  2. KAFKA-84

commit offset before consumer shutdown

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: core
    • Labels:
      None

      Description

      To avoid duplicated messages, the consumer should do a final offset commit before shutting itself down, if autocommit is enabled.

        Activity

        Jun Rao made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Jay Kreps added a comment -

        +1
        Nice catch!.
        For consistency it would be good if it was commitOffsets() instead of commitOffsets since the convention we (kind of) have is that things with side effects get the method style call and things with no side effects get the variable-access style call.

        Show
        Jay Kreps added a comment - +1 Nice catch!. For consistency it would be good if it was commitOffsets() instead of commitOffsets since the convention we (kind of) have is that things with side effects get the method style call and things with no side effects get the variable-access style call.
        Hide
        Neha Narkhede added a comment -

        Looks good.
        +1

        Show
        Neha Narkhede added a comment - Looks good. +1
        Jun Rao made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Jun Rao added a comment -

        patch ready for review.

        Show
        Jun Rao added a comment - patch ready for review.
        Jun Rao made changes -
        Field Original Value New Value
        Attachment kafka-84.patch [ 12489489 ]
        Jun Rao created issue -

          People

          • Assignee:
            Jun Rao
            Reporter:
            Jun Rao
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development