Class: Rdkafka::Producer::DeliveryReport
- Inherits:
-
Object
- Object
- Rdkafka::Producer::DeliveryReport
- Defined in:
- lib/rdkafka/producer/delivery_report.rb
Overview
Delivery report for a successfully produced message.
Instance Attribute Summary collapse
-
#error ⇒ Integer
readonly
Error in case happen during produce.
-
#label ⇒ Object?
readonly
Label set during message production or nil by default.
-
#offset ⇒ Integer
readonly
The offset of the produced message.
-
#partition ⇒ Integer
readonly
The partition this message was produced to.
-
#topic_name ⇒ String?
(also: #topic)
readonly
The name of the topic this message was produced to or nil in case delivery failed and we we not able to get the topic reference.
Instance Method Summary collapse
-
#initialize(partition, offset, topic_name = nil, error = nil, label = nil) ⇒ DeliveryReport
constructor
A new instance of DeliveryReport.
Constructor Details
#initialize(partition, offset, topic_name = nil, error = nil, label = nil) ⇒ DeliveryReport
Returns a new instance of DeliveryReport.
41 42 43 44 45 46 47 |
# File 'lib/rdkafka/producer/delivery_report.rb', line 41 def initialize(partition, offset, topic_name = nil, error = nil, label = nil) @partition = partition @offset = offset @topic_name = topic_name @error = error @label = label end |
Instance Attribute Details
#error ⇒ Integer (readonly)
Error in case happen during produce.
23 24 25 |
# File 'lib/rdkafka/producer/delivery_report.rb', line 23 def error @error end |
#label ⇒ Object? (readonly)
Returns label set during message production or nil by default.
26 27 28 |
# File 'lib/rdkafka/producer/delivery_report.rb', line 26 def label @label end |
#offset ⇒ Integer (readonly)
The offset of the produced message.
13 14 15 |
# File 'lib/rdkafka/producer/delivery_report.rb', line 13 def offset @offset end |
#partition ⇒ Integer (readonly)
The partition this message was produced to.
9 10 11 |
# File 'lib/rdkafka/producer/delivery_report.rb', line 9 def partition @partition end |
#topic_name ⇒ String? (readonly) Also known as: topic
The name of the topic this message was produced to or nil in case delivery failed and we
we not able to get the topic reference
19 20 21 |
# File 'lib/rdkafka/producer/delivery_report.rb', line 19 def topic_name @topic_name end |