How to set acks = 1, max.in.flight.requests.per.connection = 10 properties for a Kafka publisher at channel level in spring cloud stream Kafka config.
I have tried the below ways to set both properties but it isn't working.
spring.cloud.stream.bindings.<channel-name>.producer.configuration.max.in.flight.requests.per.connection
spring.cloud.stream.kafka.bindings.<channel-name>.producer.configuration.max.in.flight.requests.per.connection
In the log of o.a.k.clients.producer.ProducerConfig I see acks = -1 and requests per connection = 1, where are set under spring.cloud.stream.kafka.binder.producer-properties
spring:
cloud:
stream:
bindings:
channel_out:
destination: topicname
binder: kafka
kafka:
binder:
producer-properties:
acks: all
max.in.flight.requests.per.connection: 1
retries: 10
bindings:
channel_out:
producer:
configuration:
acks: 1
max.in.flight.requests.per.connection: 50