我们有一个微服务,使用spring-boot和spring-cloud-stream生成和使用来自Kafka的消息。
版本:
弹簧靴:1.5.8.RELEASE
spring-cloud-stream:Ditmars.RELEASE
Kafka服务器:kafka_2.11-1.0.0
修改 我们正在Kubernetes环境中使用包含3个Kafka节点的StatefulSets群集和一个包含3个Zookeeper节点的群集。
我们遇到过几次旧邮件,这些邮件在几天前已经处理过的邮件中被重新处理。
几点说明:
撤销以前为群组注册 - 服务提供的分配[] 已发现的协调员dev-kafka-1.kube1.iaas.watercorp.com:9092(id:2147483646 rack:null)
成功加入了第320代的团体注册服务
application.yml:
spring: cloud: stream: kafka: binder: brokers: kafka defaultBrokerPort: 9092 zkNodes: zookeeper defaultZkPort: 2181 minPartitionCount: 2 replicationFactor: 1 autoCreateTopics: true autoAddPartitions: true headers: type,message_id requiredAcks: 1 configuration: "[security.protocol]": PLAINTEXT #TODO: This is a workaround. Should be security.protocol bindings: user-enrollment-input: consumer: autoRebalanceEnabled: true autoCommitOnError: true enableDlq: true user-input: consumer: autoRebalanceEnabled: true autoCommitOnError: true enableDlq: true enrollment-mail-output: producer: sync: true configuration: retries: 10000 enroll-users-output: producer: sync: true configuration: retries: 10000 default: binder: kafka contentType: application/json group: enrollment-service consumer: maxAttempts: 1 producer: partitionKeyExtractorClass: com.watercorp.messaging.PartitionKeyExtractor bindings: user-enrollment-input: destination: enroll-users consumer: concurrency: 10 partitioned: true user-input: destination: user consumer: concurrency: 5 partitioned: true enrollment-mail-output: destination: send-enrollment-mail producer: partitionCount: 10 enroll-users-output: destination: enroll-users producer: partitionCount: 10
我可能缺少任何配置吗?什么可能导致这种行为?
答案 0 :(得分:0)
因此,实际问题是以下故障单中描述的问题:https://issues.apache.org/jira/browse/KAFKA-3806。 使用建议的解决方法修复它。