如何更改 [kafka-consumer-1] 这个线程名称?

How can I change [kafka-consumer-1] this thread name?

我将并发设置为 10,我可以看到 10 个不同的线程 ID,但线程名称都是相同的。如何设置监听器名称?我试过 container.setBeanName 但没有成功。请帮忙。顺便说一下我用的是1.1.2版本

线程名称是唯一的;只是引导的日志记录配置默认截断名称;我们将 fix the default thread naming 但与此同时,您可以更改日志记录配置或使用命名执行程序。在容器的 ContainerProperties ...

上使用 setConsumerTaskExecutor(execC())setListenerTaskExecutor(execL())
@Bean
public AsyncListenableTaskExecutor execC() {
    ThreadPoolTaskExecutor tpte = new ThreadPoolTaskExecutor();
    tpte.setCorePoolSize(15);
    return tpte;
}

@Bean
public AsyncListenableTaskExecutor execL() {
    ThreadPoolTaskExecutor tpte = new ThreadPoolTaskExecutor();
    tpte.setCorePoolSize(15);
    return tpte;
}