* Update KafkaApplication.java
Added partition offset to the listener so that it can start consuming the messages from the beginning of the topic.
* Revert "Update KafkaApplication.java"
This reverts commit 28801f8517.
* Counting Messages
1. Counting messages from Producer offset
2. Counting messages from Consumer
3. Rest APIs to view the count
* Refactoring
* Adding 3rd programmatic method to count number of messages in Kafka topic
* Removing irrelevant code
* Server port removed
12 lines
318 B
Java
12 lines
318 B
Java
package com.baeldung.countingmessages;
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
@SpringBootApplication
|
|
public class Application {
|
|
public static void main(String[] args){
|
|
SpringApplication.run(Application.class,args);
|
|
}
|
|
}
|