Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
# get the latest offset of topic1 : 
bin/kafka-get-offsets.sh --bootstrap-server localhost:9092 --topic topic1 --time -1

# get the offset of max timestamp of topic1
bin/kafka-get-offsets.sh --bootstrap-server localhost:9092 --topic topic1 --time -3 


# contents of kafka_admin_client.properties
bootstrap.servers=localhost:9092
security.protocol=SASL_PLAINTEXT
sasl.mechanism=SCRAM-SHA-256
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="root" password="123456";

# get offset from sasl kafka broker
bin/kafka-get-offsets.sh --command-config kafka_admin_client.properties --topic topic1 --time -1

...

  1. Support max timestamp in GetOffsetShell
  2. Support All AdminClient config in the file specified by --command-config, the only new config is retries , which means we will resend any request that fails when getting offsets.
  3. Some old KafkaConsumer config will be ignored, for example, key.deserializer and value.deserializer

...