From the course: Building Event-Driven Applications In Go
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Building an event subscriber in Go
From the course: Building Event-Driven Applications In Go
Building an event subscriber in Go
- [Instructor] All right. So if you followed me through the last video, we built a simple event producer or publisher in Go, and we used Apache Kafka. So, we set it all up and I hope you were able to set it up successfully without any errors. If that's the case, then in this video, we are looking at an event subscriber, we want to build an event subscriber. And we will build this subscriber to listen to the event or messages that are being published by our publisher. So we're going to connect these two components together using Kafka as the event broker, and I just want to show you how that works. All right, so, let's head on over to the coding environment. Here we are. So, just as a brief recap, this is what our publisher looks like. We create a simple publisher. We also created a delivery handler, report handler, but essentially, these are the messages we are publishing, and this is what they look like. Recall that we are publishing on this Kafka topic, bedaig-topic. And if you're…