Skip to content

Documentation update for KafkaListenerContainerFactory #2292

@sergey-morenets

Description

@sergey-morenets

In what version(s) of Spring for Apache Kafka are you seeing this issue?

2.8.6(latest)

Describe the bug

The latest Spring Kafka documentation contains outdated information about KafkaListenerContainerFactory (two generic types):
https://docs.spring.io/spring-kafka/reference/html/

@Bean
public KafkaListenerContainerFactory<?, ?> kafkaJsonListenerContainerFactory() {
    ConcurrentKafkaListenerContainerFactory<Integer, String> factory =
        new ConcurrentKafkaListenerContainerFactory<>();
    factory.setConsumerFactory(consumerFactory());
    factory.setMessageConverter(new JsonMessageConverter());
    return factory;
}

But the current version of KafkaListenerContainerFactory has only one generic type:
https://github.com/spring-projects/spring-kafka/blob/main/spring-kafka/src/main/java/org/springframework/kafka/config/KafkaListenerContainerFactory.java

public interface KafkaListenerContainerFactory<C extends MessageListenerContainer> {

To Reproduce

Expected behavior

Spring Kafka documentation should use only one generic type for KafkaListenerContainerFactory.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions