This commit is contained in:
Stéphane Nicoll
2024-01-31 11:50:18 +01:00
parent a4db0e7448
commit 67958656e4
2 changed files with 5 additions and 4 deletions

View File

@@ -254,6 +254,10 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
});
}
private TaskExecutor defaultTaskExecutor() {
return new TaskExecutorRegistration().getTaskExecutor();
}
private static TaskExecutor getTaskExecutor(ChannelRegistration registration,
String threadNamePrefix, Supplier<TaskExecutor> fallback) {
@@ -261,10 +265,6 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC
executor -> setThreadNamePrefix(executor, threadNamePrefix));
}
private TaskExecutor defaultTaskExecutor() {
return new TaskExecutorRegistration().getTaskExecutor();
}
private static void setThreadNamePrefix(TaskExecutor taskExecutor, String name) {
if (taskExecutor instanceof CustomizableThreadCreator ctc) {
ctc.setThreadNamePrefix(name);

View File

@@ -107,6 +107,7 @@ public class ChannelRegistration {
* @param fallback a supplier of a fallback task executor in case none is configured
* @param customizer further customizations
* @return the task executor to use
* @since 6.1.4
*/
protected TaskExecutor getTaskExecutor(Supplier<TaskExecutor> fallback, Consumer<TaskExecutor> customizer) {
if (this.executor != null) {