class WaterDrop::Clients::Dummy::Handle
‘::Rdkafka::Producer::DeliveryHandle` object API compatible dummy object
Public Class Methods
new(topic, partition, offset)
click to toggle source
@param topic [String] topic where we want to dispatch message @param partition [Integer] target partition @param offset [Integer] offset assigned by our fake “Kafka”
# File lib/waterdrop/clients/dummy.rb, line 16 def initialize(topic, partition, offset) @topic = topic @partition = partition @offset = offset end
Public Instance Methods
create_result()
click to toggle source
Creates a delivery report with details where the message went
@return [::Rdkafka::Producer::DeliveryReport]
# File lib/waterdrop/clients/dummy.rb, line 33 def create_result ::Rdkafka::Producer::DeliveryReport.new( @partition, @offset, @topic ) end
wait(*_args)
click to toggle source
Does not wait, just creates the result
@param _args [Array] anything the wait handle would accept @return [::Rdkafka::Producer::DeliveryReport]
# File lib/waterdrop/clients/dummy.rb, line 26 def wait(*_args) create_result end