class Kafka::FetchedMessage
Attributes
partition[R]
@return [Integer] the partition number that the message was written to.
topic[R]
@return [String] the name of the topic that the message was written to.
Public Class Methods
new(message:, topic:, partition:)
click to toggle source
# File lib/kafka/fetched_message.rb, line 11 def initialize(message:, topic:, partition:) @message = message @topic = topic @partition = partition end
Public Instance Methods
create_time()
click to toggle source
@return [Time] the timestamp of the message.
# File lib/kafka/fetched_message.rb, line 33 def create_time @message.create_time end
headers()
click to toggle source
@return [Hash<String, String>] the headers of the message.
# File lib/kafka/fetched_message.rb, line 38 def headers @message.headers end
is_control_record()
click to toggle source
@return [Boolean] whether this record is a control record
# File lib/kafka/fetched_message.rb, line 43 def is_control_record @message.is_control_record end
key()
click to toggle source
@return [String] the key of the message.
# File lib/kafka/fetched_message.rb, line 23 def key @message.key end
offset()
click to toggle source
@return [Integer] the offset of the message in the partition.
# File lib/kafka/fetched_message.rb, line 28 def offset @message.offset end
value()
click to toggle source
@return [String] the value of the message.
# File lib/kafka/fetched_message.rb, line 18 def value @message.value end