KBGH-356: Fix thread naming with no bean name
See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/356
Use token 'consumer' for thread prefix when no bean name.
**cherry-pick to 2.0.x, 1.3.x**
(cherry picked from commit fd69447)
This commit is contained in:
committed by
Artem Bilan
parent
82eb21f511
commit
19ea7f131a
@@ -154,9 +154,8 @@ public class ConcurrentMessageListenerContainer<K, V> extends AbstractMessageLis
|
||||
container = new KafkaMessageListenerContainer<>(this, this.consumerFactory,
|
||||
containerProperties, partitionSubset(containerProperties, i));
|
||||
}
|
||||
if (getBeanName() != null) {
|
||||
container.setBeanName(getBeanName() + "-" + i);
|
||||
}
|
||||
String beanName = getBeanName();
|
||||
container.setBeanName((beanName != null ? beanName : "consumer") + "-" + i);
|
||||
if (getApplicationEventPublisher() != null) {
|
||||
container.setApplicationEventPublisher(getApplicationEventPublisher());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user