Skip to content

no errors are reported when it is not possible to honor a @KafkaListener #1252

@ccronemberger

Description

@ccronemberger

In my project I have the following ThreadPoolTaskExecutor:

@Bean(name = "threadPoolExecutor")
public ThreadPoolTaskExecutor getAsyncExecutor() {
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(2);
    executor.setMaxPoolSize(10);
    executor.setQueueCapacity(10);
    executor.setThreadNamePrefix("consumer-");
    executor.initialize();
    return executor;
}

And in the application I have 3 methods annotated with @KafkaListener. When the application starts I can see on the Kafka server that only 2 listeners managed to start.
In this case I would expect an error to be reported.
By increasing the core pool size to 3 I managed to fix the issue. This is also strange because the max pool size is 10, so I think this is another problem.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions