0

我试过以下 spring.kafka.producer.acks= - 1 和 spring.cloud.stream.kafka.binder.requiredAcks= - 1

两者都不起作用,我的 MessageChannel.send() 在所有经纪人都关闭的情况下仍然返回 true

4

1 回答 1

0

To set acks=all use:

spring.cloud.stream.kafka.binder.producer-properties.acks=all

If you want to set for a particular channel, override as follows:

spring.cloud.stream.kafka.bindings.mytopicchannel.producer.configuration.acks=all

Ref: https://cloud.spring.io/spring-cloud-stream-binder-kafka/spring-cloud-stream-binder-kafka.html#_configuration_options

于 2021-02-11T17:41:39.513 回答