flâneur — a map of the web's best reading

Implementing a Kafka Producer and Consumer In Golang (With Full Examples) For Production

sohamkamani.com · 2,439 words · saved by 1 readers

Like what I write? Let me know your email, and I'll send you more posts like this. No spam, I promise! In this post we will learn how to create a Kafka producer and consumer in Go. We will also look at how to tune some configuration options to make our application production-ready. Kafka is an open-source event streaming platform, used for publishing and processing events at high-throughput. There are a lot of popular libraries for Go in order to interface with Kafka. For this post, we will be using the kafka-go library (but the same concepts will apply for any other library as well). If you want to skip the explanation and see the code, you can view it on Github First, make sure you have a running Kafka cluster on your machine. Before diving into the code, we should know about brokers and topics, which will be needed by both the producer and consumer. A “topic” can be thought of as a distinct queue or channel where messages are sent. For most production applications, there isn’t a sin

Implementing a Kafka Producer and Consumer In Golang (With Full Examples) For Production Sep 20, 2020 By Soham Kamani Table of Contents Getting Started Creating the Kafka Producer Creating the Kafka Consumer Tuning Kafka Client Configuration Further Reading In this post we will learn how to create a Kafka producer and consumer in Go . We will also look at how to tune some configuration options to make our application production-ready . Kafka is an open-source event streaming platform, used for publishing and processing events at high-throughput. There are a lot of popular libraries for Go in o

Explore this link on the map →

related reading