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, but I suggest beginning at https://kafka.apache.org/intro.
Using Kafka with Sarama
Getting ready
Configure your environment according to these steps:
- Refer to the Getting ready section of the Goflow for dataflow programming recipe in this chapter.
- Install Kafka using the steps mentioned at https://www.tutorialspoint.com/apache_kafka/apache_kafka_installation_steps.htm.
- Alternatively...