strimzi / metrics-reporter

Prometheus Metrics Reporter for Apache Kafka server and client components
Apache License 2.0
5 stars 9 forks source link

Keep track of HTTPServer instances #40

Closed mimaison closed 2 months ago

mimaison commented 2 months ago

An attempt at addressing #34 by keeping track of all HTTPServer instances started so they can be properly closed whenever possible. You can have multiple HTTPServer instances when several Kafka components are started in the same JVM, for example in Kafka Connect or Kafka Streams.

If multiple components attempt to create servers on the same listener, the same server will be reused. When all using components are shutdown, the server can also be closed.