Class: Kafka::FFI::Topic
- Inherits:
-
OpaquePointer
- Object
- OpaquePointer
- Kafka::FFI::Topic
- Defined in:
- lib/kafka/ffi/topic.rb
Instance Attribute Summary
Attributes inherited from OpaquePointer
Instance Method Summary collapse
-
#destroy ⇒ Object
Release the application's hold on the backing topic in librdkafka.
-
#name ⇒ String
Retrieve the name of the topic.
-
#seek(partition, offset, timeout: 1000) ⇒ Boolean
Seek consumer for topic_partition to offset.
Methods inherited from OpaquePointer
by_ref, from_native, inherited, #initialize, to_native
Constructor Details
This class inherits a constructor from Kafka::FFI::OpaquePointer
Instance Method Details
#destroy ⇒ Object
Release the application's hold on the backing topic in librdkafka.
26 27 28 29 30 |
# File 'lib/kafka/ffi/topic.rb', line 26 def destroy if !pointer.null? ::Kafka::FFI.rd_kafka_topic_destroy(self) end end |
#name ⇒ String
Retrieve the name of the topic
10 11 12 |
# File 'lib/kafka/ffi/topic.rb', line 10 def name ::Kafka::FFI.rd_kafka_topic_name(self) end |
#seek(partition, offset, timeout: 1000) ⇒ Boolean
Seek consumer for topic_partition to offset.
21 22 23 |
# File 'lib/kafka/ffi/topic.rb', line 21 def seek(partition, offset, timeout: 1000) ::Kafka::FFI.rd_kafka_seek(self, partition, offset, timeout) end |