GH-2374 minor adjustments to functional error handling

This commit is contained in:
Oleg Zhurakousky
2022-06-13 19:34:45 +02:00
parent 07357d8c5a
commit 05d5ea9af8

View File

@@ -707,6 +707,9 @@ public abstract class AbstractMessageChannelBinder<C extends ConsumerProperties,
"Error channel '" + errorChannelName
+ "' must be a SubscribableChannel");
errorChannel = (SubscribableChannel) errorChannelObject;
if (this.isSubscribable(errorChannel)) {
this.subscribeFunctionErrorHandler(errorChannelName, consumerProperties.getBindingName());
}
}
else {
BinderErrorChannel binderErrorChannel = new BinderErrorChannel();
@@ -715,7 +718,6 @@ public abstract class AbstractMessageChannelBinder<C extends ConsumerProperties,
((GenericApplicationContext) getApplicationContext()).registerBean(
errorChannelName, SubscribableChannel.class, () -> errorChannel);
this.subscribeFunctionErrorHandler(errorChannelName, consumerProperties.getBindingName());
}