Repository navigation
[KafkaIO] Remove obsolete ConsumerSpEL and ProducerSpEL reflection shims - #40839
Conversation
There was a problem hiding this comment.
📋 Review Summary
This PR cleanly removes the obsolete ConsumerSpEL and ProducerSpEL reflection shims in KafkaIO, replacing reflective calls with direct invocations against the modern kafka-clients API. The refactoring preserves existing exception handling and transaction semantics while simplifying record deserialization, header coding, and EOS sink management.
🔍 General Feedback
- Direct exception handling for
ProducerFencedException,OutOfOrderSequenceException, andAuthorizationExceptioninKafkaExactlyOnceSinkaccurately preserves the prior behavior of bypassingabortTransaction()and closing the producer in the outer handler. - Moving
offsetForTimetoKafkaIOUtilsand usingRecordHeadersdirectly inKafkaRecordCoderandProducerRecordCodereliminates unnecessary reflection and temporaryConsumerRecordallocations. - No functional bugs or regressions identified.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
Assigning reviewers: R: @damccorm for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Removes the
ConsumerSpELandProducerSpELhelpers which are no longer of any use since upgrading the minimum supported version of Kafka to 3.9.2.