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