无法在spring cloud stream kafka中设置kafka属性

时间:2017-06-21 13:13:57

标签: java spring apache-kafka spring-cloud-stream

我正在使用spring cloud stream 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

的情况也是如此

1 个答案:

答案 0 :(得分:1)