Using Kafka with Sarama

Kafka is a popular distributed message queue with a lot of advanced functions for building distributed systems. This recipe will show how to write to a Kafka topic using a synchronous producer, and how to consume the same topic using a partition consumer. This recipe will not explore different configurations of Kafka, as that is a much wider topic beyond the scope of this book, but I suggest beginning at https://kafka.apache.org/intro.