Skip to content

Commit

Permalink
use rebalanceListenerAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
vermas7988 committed Feb 12, 2025
1 parent 1283f48 commit 946cb59
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ private[consumer] final class Runloop private (
}

private val getConsumerGroupMetadataIfAny: UIO[Option[ConsumerGroupMetadata]] =
if (settings.hasGroupId) consumer.runloopAccess(c => ZIO.attempt(c.groupMetadata())).fold(_ => None, Some(_))
if (settings.hasGroupId)
consumer.rebalanceListenerAccess(c => ZIO.attempt(c.groupMetadata())).fold(_ => None, Some(_))
else ZIO.none

/** @return the topic-partitions for which received records should be ignored */
Expand Down

0 comments on commit 946cb59

Please sign in to comment.