Skip to content

Commit

Permalink
Return ScheduledExecutorService from ConsumerExecutorServiceConfig (#844
Browse files Browse the repository at this point in the history
)

* 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
  • Loading branch information
Hc747 authored Aug 29, 2023
1 parent 7534bad commit 612411b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}

0 comments on commit 612411b

Please sign in to comment.