Spring Boot + Apache Kafka Tutorial - #13 - Create Kafka Consumer to Consume JSON Message

preview_player
Показать описание
Welcome to Spring Boot + Apache Kafka Tutorial series.
In this lecture, we will create Kafka Consumer to Consume JSON Message from Kafka's topic.

#springboot #kafka #javaguides

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

This is the best videos about kafka, thank you so much!

mnaco
Автор

Hi Ramesh
Wonderful Explanation ... Keep it up !

kaushikmitra
Автор

Hi Ramesh,

Since we have consumed all the messages using JSON consumer from intellij, why all those messages again came when you consume from cmd.

Ideally messages should be removed as soon as consumer consume it.

Modi_In_Canada
Автор

Hi, can i send same message to 3rd party API from consumer ? is it mulitThread ? if i get Timeout where can i update the status ??

ravindrabangalore
Автор

Hi Ramesh, thanks for sharing such a nice series of Kafka tutorial. I am also trying hands-on with these videos. However, I am facing issues while consuming the published events. I have pushed my code to the git, and have added you as collaborator. Kindly have a look, and suggest, If I overlooked something.

techneis
Автор

How comes Kafka keeps the message in the broker even after it's been consumed? Looks like by default acts as a event store. How can I make the broker remove the message once it's been consumed, similar to RabbitMQ?

abulsyed
Автор

Hi Ramesh, I saw u commented stringserializer because u wanted to use JsonSerializer . What if I want to use both

ybs
Автор

Very good tutorial. I had an error : cannot construct instance of User (no creators like default constructor exist)

The mistake i did was that i had created a constructor for the User class ( with id, firstName & lastName )
If you have the same error, just create an empty constructor and everything should work fine








public User() {
}

adnane
Автор

Sir, i could not undestand the use of that key serializer and key deserialiser and why it is set as string and not json..what is the key for the message??please explain

riteshhraj
Автор

Hi, how many videos will be released for kafka

Nikhil-muol
Автор

Hi Bro,
Thanks for making this wonderful series. I am following your code to consume the message however I am getting Cannot convert from [java.lang.String] to for GenericMessage [payload={"id":1, "firstName":"Robin2", "lastName":"Bajaj2"}. Followed every steps as described by you. Seems like producer is sending the String to consumer but my producer is sending user model object.

public void sendMessage(User data){
Message<User> message= MessageBuilder
.withPayload(data)
.setHeader(KafkaHeaders.TOPIC, topicName)
.build();
kafkaTemplate.send(message);
Json Message sent :{}", data);
}

manindersingh