From 612411b837d8a19388d055c4628d90689da8b2cf Mon Sep 17 00:00:00 2001 From: Harrison Cole Date: Tue, 29 Aug 2023 22:52:34 +1000 Subject: [PATCH] Return ScheduledExecutorService from ConsumerExecutorServiceConfig (#844) * Return ScheduledExecutorService from ConsumerExecutorServiceConfig as per documentation (and documented behaviour). This change should be forward compatible as ScheduledExecutorService is a subtype of ExecutorService and implements all of the base functionality. * Remove unused 'io.micronaut.context.annotation.Bean' import --- .../kafka/executor/ConsumerExecutorServiceConfig.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kafka/src/main/java/io/micronaut/configuration/kafka/executor/ConsumerExecutorServiceConfig.java b/kafka/src/main/java/io/micronaut/configuration/kafka/executor/ConsumerExecutorServiceConfig.java index 1a98fbb26..b21d52536 100644 --- a/kafka/src/main/java/io/micronaut/configuration/kafka/executor/ConsumerExecutorServiceConfig.java +++ b/kafka/src/main/java/io/micronaut/configuration/kafka/executor/ConsumerExecutorServiceConfig.java @@ -15,7 +15,6 @@ */ package io.micronaut.configuration.kafka.executor; -import io.micronaut.context.annotation.Bean; import io.micronaut.context.annotation.Factory; import io.micronaut.context.annotation.Requires; import io.micronaut.scheduling.TaskExecutors; @@ -40,9 +39,8 @@ public class ConsumerExecutorServiceConfig { * @return The executor configurations */ @Singleton - @Bean @Named(TaskExecutors.MESSAGE_CONSUMER) ExecutorConfiguration configuration() { - return UserExecutorConfiguration.of(ExecutorType.FIXED, 75); + return UserExecutorConfiguration.of(ExecutorType.SCHEDULED, 75); } }