无法在spring云流kafka中设置kafka属性

yxyvkwin  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(367)

我用的是Spring Cloud溪Kafka。我为Kafka设置了如下属性:

spring.cloud.stream.bindings.output.contentType=application/x-java-object;type=com.example.demo.KafkaApplication.Message
eureka.client.service-url.default-zone=http://172.16.165.26:8761/eureka/
spring.cloud.stream.kafka.binder.zkNodes=10.6.22.20

# spring,cloud.stream.kafka.binder.brokers=10.6.22.20

spring.kafka.bootstrap-servers=10.6.22.20:9092

# spring.kafka.consumer.group-id=example-consumer-1

spring.cloud.stream.instanceCount=1
spring.cloud.stream.instanceIndex=0
spring.kafka.consumer.auto-offset-reset=earliest
spring.cloud.stream.kafka.bindings.output.group=example-consumer-1
spring.cloud.stream.kafka.bindings.output.consumer.instanceCount=1
spring.cloud.stream.kafka.bindings.output.consumer.instanceIndex=0
spring.cloud.stream.kafka.bindings.output.consumer.resetOffsets=true
spring.cloud.stream.kafka.bindings.output.consumer.startOffset=earliest

这些属性正在失效。Kafka使用的是匿名组,而不是给定的属性。startoffset也是如此

pkmbmrz7

pkmbmrz71#

这是一个已知问题,已在最新的1.3.x快照中修复:
https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/commit/7355ada4613ad50fe95430f1859d4ea65f004be1

相关问题