Class: Kafka::FetchedMessage
- Inherits:
-
Object
- Object
- Kafka::FetchedMessage
- Defined in:
- lib/kafka/fetched_message.rb
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
The key of the message.
-
#offset ⇒ Integer
readonly
The offset of the message in the partition.
-
#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.
-
#value ⇒ String
readonly
The value of the message.
Instance Method Summary collapse
-
#initialize(value:, key:, topic:, partition:, offset:) ⇒ FetchedMessage
constructor
A new instance of FetchedMessage.
Constructor Details
#initialize(value:, key:, topic:, partition:, offset:) ⇒ FetchedMessage
Returns a new instance of FetchedMessage.
19 20 21 22 23 24 25 |
# File 'lib/kafka/fetched_message.rb', line 19 def initialize(value:, key:, topic:, partition:, offset:) @value = value @key = key @topic = topic @partition = partition @offset = offset end |
Instance Attribute Details
#key ⇒ String (readonly)
Returns the key of the message.
8 9 10 |
# File 'lib/kafka/fetched_message.rb', line 8 def key @key end |
#offset ⇒ Integer (readonly)
Returns the offset of the message in the partition.
17 18 19 |
# File 'lib/kafka/fetched_message.rb', line 17 def offset @offset end |
#partition ⇒ Integer (readonly)
Returns the partition number that the message was written to.
14 15 16 |
# File 'lib/kafka/fetched_message.rb', line 14 def partition @partition end |
#topic ⇒ String (readonly)
Returns the name of the topic that the message was written to.
11 12 13 |
# File 'lib/kafka/fetched_message.rb', line 11 def topic @topic end |
#value ⇒ String (readonly)
Returns the value of the message.
5 6 7 |
# File 'lib/kafka/fetched_message.rb', line 5 def value @value end |