Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkAutoCommitIsDisabled fails with kafka-clients < 3.7.0 when using consumer inherited from KafkaConsumer #825

Open
ddqof opened this issue Aug 30, 2024 · 0 comments

Comments

@ddqof
Copy link

ddqof commented Aug 30, 2024

Consumer configuration validation fails on checking auto commit is disabled when using consumer inherited from KafkaConsumer with kafka-clients 3.7.0.

There was an issue (#195 ) that fixed problem with inherited consumer and also test was added for this case, but now it's seems like this case is broken with kafka-clients < 3.7.0. I guess it is broken because in #721 this reflection stuff was removed

...
Field coordinatorField = KafkaConsumer.class.getDeclaredField("coordinator");
...

in favour of

...
final Field coordinatorField = consumerClass.getDeclaredField("coordinator"); //NoSuchFieldException
...

and now it will fail when getting coordinator field if it defined in super class

I know there is a workaround in face of io.confluent.parallelconsumer.ParallelConsumerOptions#ignoreReflectiveAccessExceptionsForAutoCommitDisabledCheck and I will use it until this issue will be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant