Class: WaterDrop::Clients::Dummy::Handle
- Inherits:
-
Rdkafka::Producer::DeliveryHandle
- Object
- Rdkafka::Producer::DeliveryHandle
- WaterDrop::Clients::Dummy::Handle
- Defined in:
- lib/waterdrop/clients/dummy.rb
Overview
::Rdkafka::Producer::DeliveryHandle
object API compatible dummy object
Instance Method Summary collapse
-
#create_result ⇒ ::Rdkafka::Producer::DeliveryReport
Creates a delivery report with details where the message went.
-
#initialize(topic, partition, offset) ⇒ Handle
constructor
A new instance of Handle.
-
#wait(*_args) ⇒ ::Rdkafka::Producer::DeliveryReport
Does not wait, just creates the result.
Constructor Details
#initialize(topic, partition, offset) ⇒ Handle
Returns a new instance of Handle.
16 17 18 19 20 |
# File 'lib/waterdrop/clients/dummy.rb', line 16 def initialize(topic, partition, offset) @topic = topic @partition = partition @offset = offset end |
Instance Method Details
#create_result ⇒ ::Rdkafka::Producer::DeliveryReport
Creates a delivery report with details where the message went
33 34 35 36 37 38 39 |
# File 'lib/waterdrop/clients/dummy.rb', line 33 def create_result ::Rdkafka::Producer::DeliveryReport.new( @partition, @offset, @topic ) end |
#wait(*_args) ⇒ ::Rdkafka::Producer::DeliveryReport
Does not wait, just creates the result
26 27 28 |
# File 'lib/waterdrop/clients/dummy.rb', line 26 def wait(*_args) create_result end |