platform-messaging QueueConsumer уточнил stacktrace в логе при вызове Init.

This commit is contained in:
AKurakin 2023-05-23 18:56:17 +03:00
parent c2f463a1a7
commit 3b33a57218

View file

@ -75,6 +75,7 @@ public class QueueConsumer implements AutoCloseable {
}
public void init() {
final Exception debugCallerStacktrace = new Exception("init call");
inputExecutor.submit(() -> {
try {
log.debug("Using kafka consumer {} for subscribe on \"{}\"", consumer, callbacks.keySet());
@ -128,7 +129,8 @@ public class QueueConsumer implements AutoCloseable {
} catch (WakeupException e) {
if (!closed.get()) throw e;
} catch (Throwable e) {
log.error(ExceptionUtils.getStackTrace(e));
log.error("QueueConsumer error: {}; main thread stacktrace: {}",
ExceptionUtils.getStackTrace(e), ExceptionUtils.getStackTrace(debugCallerStacktrace));
} finally {
consumer.close();
}