添加日志

This commit is contained in:
ZLI263
2025-09-19 12:57:21 +08:00
parent 7855954497
commit 1f6ce44c51

View File

@@ -80,8 +80,13 @@ public class NameplateKafkaConsumer {
log.error("corpusPortrait画像铭牌异步任务执行失败", e);
} finally {
log.info("corpusPortrait 释放锁availablePermits {}", semaphore.availablePermits());
try {
ack.acknowledge(); // 提交 offset
} catch (IllegalStateException e) {
log.warn("Offset 已提交,跳过重复提交");
}
semaphore.release(); // 释放许可
log.error("释放许可,当前可用许可数:{}",semaphore.availablePermits());
}
}, executor));
@@ -89,12 +94,6 @@ public class NameplateKafkaConsumer {
// 手动提交 offset
} catch (Exception e) {
log.info("nameplateKafkaConsumerFailed to process message: {}", e);
}finally {
try {
ack.acknowledge(); // 提交 offset
} catch (IllegalStateException e) {
log.warn("Offset 已提交,跳过重复提交");
}
}
log.info("nameplateKafkaConsumer消息处理开始耗时{}", System.currentTimeMillis() - startTime);
}