我正在使用 Spring Cloud Stream 卡夫卡。
我正在尝试向 kafka 发送超过默认 1000KB 的数据。
我设置message.max.bytes
在 server.properties 文件中,如下所示:
message.max.bytes=20000000
我的 springboot 应用程序中的 application.properties 看起来像:
spring.cloud.stream.kafka.bindings.<channelName>.producer.configuration.max.request.size=20000000
这行得通。
但是,我想概括 spring cloud kafka 中的所有主题,以便能够将大文件发送到 channelName。如何设置属性以便能够将大文件(1000KB 以上)发送到所有 channel ?谢谢
最佳答案
您可以设置:
spring.cloud.stream.default.producer.configuration.max.request.size=20000000
来自 Spring Cloud Stream Kafka 引用:
To avoid repetition, Spring Cloud Stream supports setting values for all channels, in the format of
spring.cloud.stream.default.<property>=<value>
Link做医生
关于spring-boot - Spring Cloud Stream kafka绑定(bind)配置最大请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57689570/