Erlang implementation of Kafka client protocol done in OTP style