Skip to content

Instantly share code, notes, and snippets.

@PetrGlad
Last active February 3, 2026 13:45
Show Gist options
  • Select an option

  • Save PetrGlad/187ea07aecf1eb4419369dd047ae91e6 to your computer and use it in GitHub Desktop.

Select an option

Save PetrGlad/187ea07aecf1eb4419369dd047ae91e6 to your computer and use it in GitHub Desktop.
Examples how to extract infomration from Kafka messages encoded for AWS Glue using Avro
# https://lenses.io/blog/aws_glue_schema_registry_that_binds_apache_kafka
# 16 bytes starting with 3rd contain UUID of AWS Glue schema.
cat message.base64 | base64 -d | tail -c+3 | head -c16 | uuid -d -F BIN -
# Bytes starting from 19 contain the message itself.
cat message.base64 | base64 -d | tail -c+19 | java -jar avro-tools-1.12.1.jar fragtojson --schema-file schema.avsc -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment