Versions Compared

Key

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

...

       2. For all topics in the topics.txt file from step 1, alter the topic by adding custom config to set retention time to 1 second or less. This means after 1 second, all messages in all topics will be deleted.

Code Block
languagebash
themeMidnight
titlealter-topic-config.sh
#!/bin/bash -e

awk '{ system("./kafka-configs.sh --alter --bootstrap-server <bootstrap-plaintext-connection-url> --entity-type topics --entity-name="$1" --add-config retention.ms=" 1000) }' topics.txt

...