This little project is a kafka protocol file generator. Kafkas wire format is predominantly defined on this webpage. The BNF definitions in this webpage are generated by evaluating the actual class files. The code that does that lives here. This generator takes the output of this program (in the widest sense) the content of the kafka protocol definition, parses the BNF fields, and generates go files with struct definitions and marshalling and unmarshalling logic.
In order to build the generator, clone this repo and hit
mvn package
You invoke the resulting jar with
java -jar target/kafka-protocol-generator-1.0.0-SNAPSHOT.jar <path to source file> <folder to generate files into>