Apache-client 3.9.1 (used in spring 3.5.0) not compatible with 0.5.3.2 of parallelConsumer
Hi,
Its seems to me that the compatibility with a new version of Apache-client 3.9.1 with the current implementation of parallel consumer does not work anymore. It seems that this newer version remove the "org.apache.kafka.clients.consumer.internals.LegacyKafkaConsumer" and replace it with "org.apache.kafka.clients.consumer.internals.ClassicKafkaConsumer", this leads to an issue on getAutoCommitEnabled method where we always enter inside the else part
if ("org.apache.kafka.clients.consumer.internals.LegacyKafkaConsumer".equals(delegate.getClass().getName())) { final boolean autoCommitEnabled = getAutoCommitEnabledFromCoordinator(delegate.getClass(), delegate); return Optional.of(autoCommitEnabled); } else if ("org.apache.kafka.clients.consumer.internals.AsyncKafkaConsumer".equals(delegate.getClass().getName())) { final Field autoCommitEnabledField = delegate.getClass().getDeclaredField("autoCommitEnabled"); //NoSuchFieldException autoCommitEnabledField.setAccessible(true); final boolean autoCommitEnabled = (boolean) autoCommitEnabledField.get(delegate); //IllegalAccessException return Optional.of(autoCommitEnabled); } else { log.warn("Encountered unknown consumer delegate {}", consumer.getClass()); return Optional.empty(); }
Thanks a lot for you help.
Kind regards olivier
This seems to be the commit, where the class was renamed. Any chance of getting this fixed soon? This affects projects upgrading from spring-boot 3.4.x to 3.5.0, which includes kafka 3.9.1 by default.
+1 for this, we have the same problem
also have this problem :'(
+1
This is fixed in master
Is a release planned in the near future?
The last release took nearly a year, support for Kafka 3.9.1 has been merged in November: https://github.com/confluentinc/parallel-consumer/pull/841 Could you retry with 0.5.3.3?
Please be aware that Spring Boot 4 will depend on Kafka 4.1 (release is planned for 2025-11-20): https://github.com/spring-projects/spring-boot/blob/v4.0.0-M3/platform/spring-boot-dependencies/build.gradle#L1134