Class: Kafka::FetchedMessage
- Inherits:
-
Object
- Object
- Kafka::FetchedMessage
- Defined in:
- lib/kafka/fetched_message.rb
Instance Attribute Summary collapse
-
#partition ⇒ Integer
readonly
The partition number that the message was written to.
-
#topic ⇒ String
readonly
The name of the topic that the message was written to.
Instance Method Summary collapse
-
#create_time ⇒ Time
The timestamp of the message.
-
#headers ⇒ Hash<String, String>
The headers of the message.
-
#initialize(message:, topic:, partition:) ⇒ FetchedMessage
constructor
A new instance of FetchedMessage.
-
#is_control_record ⇒ Boolean
Whether this record is a control record.
-
#key ⇒ String
The key of the message.
-
#offset ⇒ Integer
The offset of the message in the partition.
-
#value ⇒ String
The value of the message.
Constructor Details
#initialize(message:, topic:, partition:) ⇒ FetchedMessage
11 12 13 14 15 |
# File 'lib/kafka/fetched_message.rb', line 11 def initialize(message:, topic:, partition:) @message = @topic = topic @partition = partition end |
Instance Attribute Details
#partition ⇒ Integer (readonly)
9 10 11 |
# File 'lib/kafka/fetched_message.rb', line 9 def partition @partition end |
#topic ⇒ String (readonly)
6 7 8 |
# File 'lib/kafka/fetched_message.rb', line 6 def topic @topic end |
Instance Method Details
#create_time ⇒ Time
33 34 35 |
# File 'lib/kafka/fetched_message.rb', line 33 def create_time @message.create_time end |
#headers ⇒ Hash<String, String>
38 39 40 |
# File 'lib/kafka/fetched_message.rb', line 38 def headers @message.headers end |
#is_control_record ⇒ Boolean
43 44 45 |
# File 'lib/kafka/fetched_message.rb', line 43 def is_control_record @message.is_control_record end |
#key ⇒ String
23 24 25 |
# File 'lib/kafka/fetched_message.rb', line 23 def key @message.key end |
#offset ⇒ Integer
28 29 30 |
# File 'lib/kafka/fetched_message.rb', line 28 def offset @message.offset end |
#value ⇒ String
18 19 20 |
# File 'lib/kafka/fetched_message.rb', line 18 def value @message.value end |