Event Publisher Polishing
Now that the abstract binder makes its event publisher available to subclasses, use it, if present, instead of the application context. In most cases, they will be the same object, but the user might override the publisher. Resolves #336
This commit is contained in:
committed by
Oleg Zhurakousky
parent
b5a0013e1e
commit
2406fe5237
@@ -371,8 +371,14 @@ public class KafkaMessageChannelBinder extends
|
||||
};
|
||||
messageListenerContainer.setConcurrency(concurrency);
|
||||
// these won't be needed if the container is made a bean
|
||||
messageListenerContainer.setApplicationEventPublisher(getApplicationContext());
|
||||
if (getApplicationEventPublisher() != null) {
|
||||
messageListenerContainer.setApplicationEventPublisher(getApplicationEventPublisher());
|
||||
}
|
||||
else if (getApplicationContext() != null) {
|
||||
messageListenerContainer.setApplicationEventPublisher(getApplicationContext());
|
||||
}
|
||||
messageListenerContainer.setBeanName(destination.getName() + ".container");
|
||||
// end of these won't be needed...
|
||||
if (!extendedConsumerProperties.getExtension().isAutoCommitOffset()) {
|
||||
messageListenerContainer.getContainerProperties()
|
||||
.setAckMode(AbstractMessageListenerContainer.AckMode.MANUAL);
|
||||
|
||||
Reference in New Issue
Block a user