factorhouse / kpow-streams-agent

Monitor Kafka Streams applications with Kpow
Apache License 2.0
11 stars 1 forks source link

Streams Configuration Reuse - Bootstrap Vector #2

Open d-t-w opened 3 years ago

d-t-w commented 3 years ago

End users and our sample Spring Cloud integration both identify issue with reusing the Spring config, e.g:

StreamsBuilderFactoryBean streamsBuilderFactoryBean = context.getBean("&stream-builder-process", StreamsBuilderFactoryBean.class);
        KafkaStreams streams = streamsBuilderFactoryBean.getKafkaStreams();
        Topology topology = streamsBuilderFactoryBean.getTopology();

        // Create connection properties for the StreamsRegistry producer to send metrics to internal kPow topics
        // You should be able to use streamsBuilderFactoryBean.getStreamsConfiguration() but in this particular case
        // Those properties contain 'bootstrap.servers = [[localhost:9092]]' which errors on startup

        Properties properties = new Properties();
        properties.setProperty("bootstrap.servers", "127.0.0.1:9092");

From README: https://github.com/operatr-io/kpow-streams-agent-example-spring

  1. Investigate why Bootstrap presented as an array of nodes.
  2. Identify if it's possible other configuration params have unexpected format.
  3. Interpret or make error case very clear, depending on (1) and (2)
d-t-w commented 3 years ago

Tom points out this might just be an array of bootstrap being valid for streams config but not producer.