lib/rdkafka/producer/delivery_handle.rb in rdkafka-0.12.1 vs lib/rdkafka/producer/delivery_handle.rb in rdkafka-0.13.0.beta.1
- old
+ new
@@ -1,22 +1,25 @@
+# frozen_string_literal: true
+
module Rdkafka
class Producer
# Handle to wait for a delivery report which is returned when
# producing a message.
class DeliveryHandle < Rdkafka::AbstractHandle
layout :pending, :bool,
:response, :int,
:partition, :int,
- :offset, :int64
+ :offset, :int64,
+ :topic_name, :pointer
# @return [String] the name of the operation (e.g. "delivery")
def operation_name
"delivery"
end
# @return [DeliveryReport] a report on the delivery of the message
def create_result
- DeliveryReport.new(self[:partition], self[:offset])
+ DeliveryReport.new(self[:partition], self[:offset], self[:topic_name].read_string)
end
end
end
end