Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-6764

ConsoleConsumer behavior inconsistent when specifying --partition with --from-beginning

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: consumer
    • Labels:

      Description

      Per its usage statement, kafka-console-consumer.sh ignores --from-beginning when the specified consumer group has committed offsets, and sets auto.offset.reset to latest. However, if --partition is also specified, --from-beginning is observed in all cases, whether there are committed offsets or not.

      This happens because when --from-beginning is specified, offsetArg is set to OffsetRequest.EarliestTime. However, offsetArg is only passed to the constructor for NewShinyConsumer when --partition is also specified. Hence, it is honored in this case and not the other.

      This case should either be handled consistently, or the usage statement should be modified to indicate the actual behavior/usage.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcqueary Larry McQueary
                Reporter:
                mcqueary Larry McQueary
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: