[#9] poll 작업이 완료되었다고 판단하는 기준 수정 #10

Merged
pricelees merged 2 commits from refactor/#9 into main 2025-06-27 07:13:25 +00:00
Showing only changes of commit e5916eb305 - Show all commits

View File

@ -22,7 +22,7 @@ public class RecordProcessor {
private long initialRecordReceivedTime = 0;
public void process(ConsumerRecords<String, TestRecord> records) throws Exception {
initializeTime();
preProcess();
log.debug("[RecordProcessor] process {} records. thread: {}", records.count(),
Thread.currentThread().getName());
@ -50,9 +50,11 @@ public class RecordProcessor {
}
}
private void initializeTime() {
private void preProcess() {
if (initialRecordReceivedTime == 0) {
initialRecordReceivedTime = System.currentTimeMillis();
}
emptyPollResultCount.set(0);
}
}