In spring-boot,
application.yml:
kafka:
bootstrap-servers: localhost:9092
listener:
concurrency: 10
ack-mode: MANUAL
producer:
topic: test-record
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
retries: 3
orn-record:
timeout: 3
#acks: 1
consumer:
groupId: test-record
topic: test
enable-auto-commit: false
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
By using above configuration, We can avoid java web(bean) based configuration in spring boot and it's a high worthy advantage.
Q: Can we add kafka error handler and kafka consumer number of retry properties from application.properties / application.yml ?
I could not find any reference or documentation about it hence hoping some conclusion, just because of this issue now I have to go to java web based configuration in spring boot and remove the properties configuration which is again going back to old way in spring. I believe there should be some workaround and we could achieve this through property file configuration.