如何删除关于 conluent.monitoring.interceptor 的警告?

How to remove this warning about conluent.monitoring.interceptor?

我正在使用 Spring-Kafka 在 Spring Boot 2.2.2 服务中使用 KafkaTemplate 向 Kafka 发布消息。消息已成功发布,但是我的日志在我发布第一条消息后立即充满了以下警告:

[Producer clientId=confluent.monitoring.interceptor.fagfgfsgas-1] Bootstrap broker confluent-kafka.eabcd.com:1234 (id: -1 rack: null) disconnected

我想我要么拼错了其中一个属性,要么放错了地方,但我想不出是什么。这是我的 yaml 的样子:

spring:
  kafka:
    producer:
      client-id: "abcd"
      acks: 1
      bootstrap-servers: confluent-kafka.eabcd.com:1234
      key-serializer: io.confluent.kafka.serializers.KafkaAvroSerializer
      value-serializer: io.confluent.kafka.serializers.KafkaAvroSerializer
      confluent.monitoring.interceptor.sasl.mechanism: PLAIN
      confluent.monitoring.interceptor.security.protocol: SASL_PLAINTEXT
      confluent.monitoring.interceptor.sasl.jaas.config: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="username" password="password";'
      properties:
        request.timeout.ms: 10000
        retry.backoff.ms: 500
        schema.registry.url: https://confluent-schemaregistry.abcdef.com
        ssl.endpoint.identification.algorithm: http
        sasl.jaas.config: 'org.apache.kafka.common.security.plain.PlainLoginModule required username="username" password="password";'
        security.protocol: SASL_PLAINTEXT
        sasl.mechanism: PLAIN
        interceptor.classes: io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor

这表示无法建立您与 bootstrap-servers 的连接

我建议你在没有 interceptor.classes

的情况下调试代码

并且 confluent.monitoring.interceptor 东西需要放在属性部分下