confluentinc / parallel-consumer

Parallel Apache Kafka client wrapper with per message ACK, client side queueing, a simpler consumer/producer API with key concurrency and extendable non-blocking IO processing.
https://confluent.io/confluent-accelerators/#parallel-consumer
Apache License 2.0
76 stars 125 forks source link

Fix redundant rebalance callback in `LongPollingMockConsumer` for Kafka >= 3.6 #765

Closed nscuro closed 4 months ago

nscuro commented 4 months ago

Rebalance listeners are invoked by MockConsumer since Kafka 3.6.0 (https://github.com/apache/kafka/compare/3.5...3.6#diff-0ebcab2d2727abe3f0f1e3a94321b068ef2478911a33861d072a7a2ecbb1cf1f). Doing it manually is no longer necessary.

The redundant listener invocation caused test failures, for example PCMetricsTest (see https://github.com/confluentinc/parallel-consumer/pull/762#issuecomment-2108553270).

Refer to https://github.com/confluentinc/parallel-consumer/pull/762#issuecomment-2110677240 for more details.

Checklist

rkolesnev commented 4 months ago

/sem-approve