lib/rdkafka/consumer.rb in karafka-rdkafka-0.14.3 vs lib/rdkafka/consumer.rb in karafka-rdkafka-0.14.4
- old
+ new
@@ -669,9 +669,25 @@
end_time = monotonic_now + timeout_ms / 1000.0
end
end
end
+ # Returns pointer to the consumer group metadata. It is used only in the context of
+ # exactly-once-semantics in transactions, this is why it is never remapped to Ruby
+ #
+ # This API is **not** usable by itself from Ruby
+ #
+ # @note This pointer **needs** to be removed with `#rd_kafka_consumer_group_metadata_destroy`
+ #
+ # @private
+ def consumer_group_metadata_pointer
+ closed_consumer_check(__method__)
+
+ @native_kafka.with_inner do |inner|
+ Bindings.rd_kafka_consumer_group_metadata(inner)
+ end
+ end
+
private
def closed_consumer_check(method)
raise Rdkafka::ClosedConsumerError.new(method) if closed?
end