Skip to content

Commit

Permalink
fix compatibility with kafka-clients 3.7.0, by using local version of…
Browse files Browse the repository at this point in the history
… NoOpConsumerRebalanceListener (#416)

Co-authored-by: jmast <[email protected]>
  • Loading branch information
johanmast and jmast authored Mar 20, 2024
1 parent 7e602b3 commit 17eeab7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.evolutiongaming.catshelper.CatsHelper._
import com.evolutiongaming.catshelper._
import com.evolutiongaming.skafka.Converters._
import com.evolutiongaming.skafka.consumer.ConsumerConverters._
import org.apache.kafka.clients.consumer.internals.NoOpConsumerRebalanceListener
import org.apache.kafka.clients.consumer.{
OffsetCommitCallback,
Consumer => ConsumerJ,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.evolutiongaming.skafka.consumer

import org.apache.kafka.clients.consumer.ConsumerRebalanceListener
import org.apache.kafka.common.TopicPartition

import java.util

/** Local version of NoOpConsumerRebalanceListener, because it was removed in kafka-clients 3.7.0
*/
private[skafka] final class NoOpConsumerRebalanceListener extends ConsumerRebalanceListener {

override def onPartitionsRevoked(partitions: util.Collection[TopicPartition]): Unit = ()

override def onPartitionsAssigned(partitions: util.Collection[TopicPartition]): Unit = ()
}

0 comments on commit 17eeab7

Please sign in to comment.