lucasbru commented on code in PR #19421:
URL: https://github.com/apache/kafka/pull/19421#discussion_r2037145316
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -180,6 +186,25 @@ public class AsyncKafkaConsumer<K, V> implements
ConsumerDelegate<K, V> {
*/
private class BackgroundEventProcessor implements
EventProcessor<BackgroundEvent> {
+ private Optional<StreamsRebalanceListener>
streamsGroupRebalanceCallbacks = Optional.empty();
+ private final Optional<StreamsRebalanceData> streamsRebalanceData;
+
+ public BackgroundEventProcessor() {
+ this.streamsRebalanceData = Optional.empty();
+ }
+
+ public BackgroundEventProcessor(final Optional<StreamsRebalanceData>
streamsRebalanceData) {
+ this.streamsRebalanceData = streamsRebalanceData;
+ }
+
+ private void setStreamsRebalanceListener(final
StreamsRebalanceListener streamsRebalanceListener) {
Review Comment:
I think you mentioned this, but could we not just make
`streamsRebalanceListener` a meber of `streamsRebalanceData`? If not, could we
pass it in the constructor instead of using a setter?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]