Kafka Consumer
The main purpose of the Kafka Consumer is to read data from a topic.
The Kafka consumer fetches the messages from topic's partitions.
The Kafka Consumer required Deserializer to transform bytes to object to identify key and value of messages.
If a consumer reads data from a topic's partition, data/messages comes in order way
such as message 0, message 1, message 2, message 3, message 4, message 5 and so on.
If a consumer reads data from a multiple topic's partitions, there is no ordering across partitions.
- The main purpose of the Kafka Consumer is read data from a topic.
- The Kafka consumer fetches the messages from topic's partitions.
- The Kafka Consumer required Deserializer to transform bytes to object to identify key and value of messages.
- If a consumer reads data from a topic's partition, data/messages comes in order way
such as message 0, message 1, message 2, message 3, message 4, message 5 and so on.
- If a consumer reads data from a multiple topic's partitions, there is no ordering across partitions.
- Example of KeyDeserializer=IntegerDeserializer.
- Example of ValueDeserializer=StringDeserializer.
Read this article of
Create Kafka Consumer In Java
Kafka Consumer Read
Create Kafka Consumer In Java
In the next topic, you will understand about
Create Kafka Cluster