Created
January 30, 2018 23:44
-
-
Save OneCricketeer/d9179fc010ffa4bf33cf30dd3db29ee0 to your computer and use it in GitHub Desktop.
Get the embedded schema IDs of Confluent KafkaAvroSerializer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while :; do kafka-console-consumer --topic $TOPIC --bootstrap-server $KAFKA --max-messages=1 2>/dev/null | hexdump | head -n 1 | cut -d' ' -f 5,6 | tr -ds '[[:space:]]' '' | { IFS= read -r schemaId; printf '%s\n' "$((16#${schemaId}))"; }; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expanded version