Skip to content

Documentation typo - Class names clashing - @EmbeddedKafka Annotation #3701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gcoppex opened this issue Jan 9, 2025 · 1 comment
Closed

Comments

@gcoppex
Copy link
Contributor

gcoppex commented Jan 9, 2025

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

3.3.1 documentation

Bug Description

The java code snippet in the @EmbeddedKafka Annotation section has a confusing class name. The test configuration class name clashes with the KafkaStreamsConfiguration class name. I propose to rename it to TestKafkaStreamsConfiguration (see below).

The documentation should have something like:

@Configuration
    @EnableKafkaStreams
    public static class TestKafkaStreamsConfiguration {

        @Value("${" + EmbeddedKafkaBroker.SPRING_EMBEDDED_KAFKA_BROKERS + "}")
        private String brokerAddresses;

        @Bean(name = KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME)
        public KafkaStreamsConfiguration kStreamsConfigs() {
            Map<String, Object> props = new HashMap<>();
            props.put(StreamsConfig.APPLICATION_ID_CONFIG, "testStreams");
            props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, this.brokerAddresses);
            return new KafkaStreamsConfiguration(props);
        }

    }
``

@sobychacko
Copy link
Contributor

Fixed via #3702.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants