#44 Golang - Mastering Kafka with Golang: A Beginner's Guide

preview_player
Показать описание
In this episode, we will explore how to use Kafka with Golang by building a Coffee Order and Brewing System. We will cover how to send coffee orders to Kafka and process those orders to notify when the coffee is being brewed. Let's dive in!

Apache Kafka is a powerful distributed event streaming platform capable of handling trillions of daily events. It's perfect for systems that require a large volume of events or message exchange. We'll use Golang with the Sarama library, a Go client library for Kafka.

What You'll Learn:
1. Implementing the Producer Logic: Step-by-step guide on parsing requests, converting data, and sending messages to Kafka.
2. Building the Consumer: Discover how to listen to a topic and process incoming messages.
3. Handling OS Signals: Ensure clean exit and resource management for your Kafka consumer.

Getting Started:
1. Kafka Setup: Use Docker to run Kafka on your local machine.
2. Run the Producer Server: Start the HTTP server to accept coffee orders.
3. Run the Consumer: Start the consumer to listen for and process orders.
4. Place Orders: Send coffee order requests and observe the system's response.

By the end of this video, you’ll have a functional Kafka producer and consumer using Golang. This example demonstrates the power of Kafka for managing event-driven applications and how Golang makes it simple and efficient to interact with Kafka.

I hope this was helpful. If you have any questions or comments, feel free to leave them below. Don't forget to like and subscribe for more tech tutorials. Happy coding!

Resources:

Timestamps:
00:00 - Introduction
01:00 - Producer implementation
09:00 - Consumer implementation
14:43 - Run the code
16:41 - Concluding remarks

If you have any questions or suggestions, leave a comment below. We love hearing from you!

Thanks for watching!

------------------------------------------------------------------------------------------------------------------------------

Buy my book 'Functional Programming with Go' here:

Рекомендации по теме
Комментарии
Автор

This was a great video. I loved the pacing and explanation.

lacroixboi
Автор

This was really easy to understand 😁 thank you, can i know how u inserted those key tap sounds in the video, that was too awesome for not to ask!!

supermanish
Автор

Ohh, kafka,

Now I will start following these videos

kartikrajput
Автор

Nice explanation. How would one add customizations to the order? For example, Latte, add 2 shots of espresso, almond milk. The assumption is that a POS system would be used to create the order, and add customizations. There could also be multiple items on an order. I just haven't found any advanced Kafka message designs. Only basic messages. Thx.

StevenSugg-tr
Автор

Can you make a video on creating an excel file using using excelize library having a million rows with almost 100 column. Thanks in advance

asntechies
Автор

Paji ap apni voice kyun nahi use karte.

prashlovessamosa