Spring Boot + Apache Kafka Tutorial - #19 - Create Kafka Consumer Project | Configure Kafka Consumer

Welcome to Spring Boot + Apache Kafka Tutorial series. In this lecture, we will create a Kafka consumer project and we also configure Kafka Consumer to consume real-time Wikimedia data from the Kafka topic.

Lecture - #19 - Create Kafka Consumer Project | Configure Kafka Consumer


Hi. You're welcome back. In a couple of lectures, we have seen how to implement a Wikimedia Capture Preserve, which you will basically read a real time event stream data from the Wikimedia and it will write to the capture broker. Right. In next upcoming lectures, we will see how to implement Cabochon Dynamo, which will consume that data from the capture broker and it will write to the My Cycle database. Okay. In this lecture we create a springboard project for our consumer, and then next lecture onwards we'll start implementing Kafka Consumer to consume data from local quebecor and we'll also see how to store that data to the MySchool database. Well, let's head over to the English idea here. We have a parent project which in that we have modern Kafka preserved Camellia. So let's go to one more model. So right click on the Parent Project New and then choose module and then you know, tick mark this and then click on next and then let's go model name at Kafka consumer database, something like this and then click on finish. So this will create this Kafka consumer database model within this parent project. So as soon as we create a model, it will add one entry into politics in middle of this parent project. So if we can go to politics, all of this parent project, you can see one in two will be added in the model model section. Right? So go ahead and click on this lower mounted icon here. Okay. Now let's make a necessary changes for this, you know, model to make this model as a springboard project. So first of all, go to politics X-Men File and let's add a packaging type as a jet and save it and click on this lower mountain just button. Next, let's create the main entry point class for this project. So right click on the Java package and new and then just package and let you get back any image needed in Java grades dot springwood hit enter and within this package be able to create a spring meaning to print class. So right click on this package new and then choose Java class. Let your class animate springboard consumer application and then hit enter and let's make this class as a springboard meaning deeper class. So in order to do that, let's hang onto this class with that springboard application annotation. And then within this class, let's create a main method. All right. And within a minute, let's call spring application, dot and method and the Springboard Consumer Application class. All right, perfect. Now we have a painter being what? Meaning to bind class. All right, now this module becomes a springboard project. Okay, now we're going to create the capture consumer. So before that, let's run this project and let's verify this setup is correct or not. So in order to do that, go to the moment here and then click on this execute. It was a good morning icon. We're here and then here. Just one moment in use. Don't come on. And there we go. We look at it as being both category and what project is a parent project. Within that, we have got to preserve Wikimedia Commons, our consumer database. So these are the two models within this parent project. And all these projects are, you know, birth success. It means the model that just we have created under this parent project is working as expected. Okay, great. In next lecture will configure compaction in application or properties file. Alright. I want you in the next lecture.