馬老師ID生成器與數(shù)據(jù)同步器原理
while (true) {
? ? ?System.out.println("運行中......");
? ? ?Long lastModifiedKey = aggRecordMap.getOrDefault(lastMsgTimeKey, 0L);
? ? ?if (lastModifiedKey > 0 && System.currentTimeMillis() - lastModifiedKey > windowSize.toMillis()) {
? ? ? ?producer.send(new ProducerRecord<>(SOURCE_TOPIC, lastModifiedKey.toString(), signal));
? ? ?}
標簽: