lib/karafka/connection/rebalance_manager.rb in karafka-2.1.4 vs lib/karafka/connection/rebalance_manager.rb in karafka-2.1.5.beta1
- old
+ new
@@ -47,22 +47,20 @@
end
# Callback that kicks in inside of rdkafka, when new partitions are assigned.
#
# @private
- # @param _ [Rdkafka::Consumer]
# @param partitions [Rdkafka::Consumer::TopicPartitionList]
- def on_partitions_assigned(_, partitions)
+ def on_partitions_assigned(partitions)
@assigned_partitions = partitions.to_h.transform_values { |part| part.map(&:partition) }
@changed = true
end
# Callback that kicks in inside of rdkafka, when partitions are revoked.
#
# @private
- # @param _ [Rdkafka::Consumer]
# @param partitions [Rdkafka::Consumer::TopicPartitionList]
- def on_partitions_revoked(_, partitions)
+ def on_partitions_revoked(partitions)
@revoked_partitions = partitions.to_h.transform_values { |part| part.map(&:partition) }
@changed = true
end
# We consider as lost only partitions that were taken away and not re-assigned back to us