Skip to content

Instantly share code, notes, and snippets.

@tuananhlai
Last active March 23, 2022 04:27
Show Gist options
  • Save tuananhlai/d568a536a3d7a97a2631b001c7c40bdc to your computer and use it in GitHub Desktop.
Save tuananhlai/d568a536a3d7a97a2631b001c7c40bdc to your computer and use it in GitHub Desktop.
Copy all messages from a source topic to a target topic
DELIM="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 40 | head -n 1)";
# Add `-c 1` to test with 1 message
kcat -b localhost:9092 -C -t source_topic -D "$DELIM" -K: -e -o beginning | kcat -b localhost:9092 -P -D "$DELIM" -t target_topic -K:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment