Reputation: 1392
I am using spring cloud stream kafka.
I am trying to send data to kafka which is more than the default 1000KB.
I set message.max.bytes
in server.properties file as given below:
message.max.bytes=20000000
and application.properties in my springboot app looks like:
spring.cloud.stream.kafka.bindings.<channelName>.producer.configuration.max.request.size=20000000
This works. However, I would like to generalize all topics in spring cloud kafka to be able to send large files to the channelName. How can I set the properties so that I am able to send large file (above 1000KB) to all channels? Thanks
Upvotes: 5
Views: 3592
Reputation: 666
With the latest versions kafka 2.5+ i have tested and the below works
spring.cloud.stream.kafka.binder.configuration.max.request.size=<specify size in bytes>
Upvotes: 1
Reputation: 2914
You can set:
spring.cloud.stream.default.producer.configuration.max.request.size=20000000
From Spring Cloud Stream Kafka Reference:
To avoid repetition, Spring Cloud Stream supports setting values for all channels, in the format of
spring.cloud.stream.default.<property>=<value>
Link to doc
Upvotes: 3