加日志

This commit is contained in:
ZLI263
2025-09-19 13:49:54 +08:00
parent 1f9799a901
commit 2d1af55dbb

View File

@@ -61,11 +61,20 @@ public class NameplateKafkaConsumer {
if (!"INSERT".equals(tmNameplateCorpus.getType()) || CollectionUtils.isEmpty(tmNameplateCorpus.getData())) {
ack.acknowledge();
}
tmNameplateCorpus.getData().forEach(nameplate ->
tmNameplateCorpusService.processItem(nameplate));
} catch (Exception e) {
log.error("处理消息失败", e);
} finally {
try {
ack.acknowledge(); // 提交 offset
} catch (IllegalStateException e) {
log.warn("Offset 已提交,跳过重复提交");
}
log.error("释放许可,当前可用许可数:{}", semaphore.availablePermits());
}
}