In my application, I created my own custom listener in order to not use the @KafkaListener annotation. I configured to listen the messages in a record to record bases. That is working. Now I want to transform my custom listener to listen to messages in a batch. Should I just configure the ConsumerConfig.MAX_POLL_RECORDS_CONFIG to the amount of message I want to process per poll? I would also change my AckMode to BATCH. Is this all I need to do?
I know that ConcurrentKafkaListenerContainerFactory has the property "setBatchListener(true)", but as far as I understand the Kafka documentation, this type of factory configuration is only utilized with the @KafkaListener annotation.
Any help will be greatly appreciated.