kafka-ops / julie

A solution to help you build automation and gitops in your Apache Kafka deployments. The Kafka gitops!
MIT License
417 stars 113 forks source link

Pull all available messages in the backend topic (state topic) before creating the topology plan #553

Open yoniv87 opened 1 year ago

yoniv87 commented 1 year ago

… continuing to build the topology plan

Bug fix #552

When using Kafka Backend, after the message puller can retrieve some messages ( records.count() > 0 ), it goes to callback.initialLoadFinish(), even in case there are more available messages in the topic.

In case there are messages (records.count() > 0), the application will reset the counter (times = 0) and will try to run the iteration again to fetch more messages. Only in the case that no messages are available to fetch ( records.count() == 0 ), the application will do several retries (times >= config.getKafkaBackendConsumerRetries()) and then continue to callback.initialLoadFinish();