我正在运行我使用的3个服务实例:

  • Scala 2.11.12

  • kafkaStreams 1.1.0

  • kafkaStreamsScala 0.2.1(由lightbend提供)

该服务使用具有以下拓扑(高级别)的Kafka流:

  • InputTopic

  • 解析为已知类型

  • 清除解析失败的消息

  • 将每条消息拆分为6条新消息
    每个消息运行

  • :map.groupByKey.reduce(使用本地存储).toStream.to

一切都按预期工作,但我无法摆脱持续显示的WARN消息:

15:46:00.065 [kafka-producer-network-thread | my_service_name-1ca232ff-5a9c-407c-a3a0-9f198c6d1fa4-StreamThread-1-0_0-producer] [WARN ] [o.a.k.c.p.i.Sender] - [Producer clientId=my_service_name-1ca232ff-5a9c-407c-a3a0-9f198c6d1fa4-StreamThread-1-0_0-producer, transactionalId=my_service_name-0_0] Got error produce response with correlation id 28 on topic-partition my_service_name-state_store_1-repartition-1, retrying (2 attempts left). Error: UNKNOWN_PRODUCER_ID

如您所见,我从Kafka流管理的INTERNAL主题中获取了这些错误 . 看起来像内部主题中的 生产环境 者元数据上的某种保留期/某种 生产环境 者ID重置 .

无法找到有关此问题的任何内容,只能从here找到错误本身的描述:

ERROR   CODE    RETRIABLE   DESCRIPTION

UNKNOWN_PRODUCER_ID 59  False   This exception is raised by the broker if it could not locate the producer metadata associated with the producerId in question. This could happen if, for instance, the producer's records were deleted because their retention time had elapsed. Once the last records of the producer id are removed, the producer's metadata is removed from the broker, and future appends by the producer will return this exception.

希望你能帮忙,谢谢

Edit: 似乎在kafka流版本1.0.1上没有弹出WARN消息 .