Class: Poseidon::FetchedMessage
- Inherits:
-
Object
- Object
- Poseidon::FetchedMessage
- Defined in:
- lib/poseidon/fetched_message.rb
Overview
A message fetched from a Kafka broker.
= consumer.fetch
.each do |fm|
puts "Topic: #{fm.topic}"
puts "Value #{fm.value}"
puts "Key: #{fm.key}"
puts "Offset: #{fm.offset}"
end
Instance Attribute Summary collapse
- #key ⇒ Object readonly
- #offset ⇒ Object readonly
- #topic ⇒ Object readonly
- #value ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(topic, value, key, offset) ⇒ FetchedMessage
constructor
A new instance of FetchedMessage.
Constructor Details
#initialize(topic, value, key, offset) ⇒ FetchedMessage
Returns a new instance of FetchedMessage.
30 31 32 33 34 35 |
# File 'lib/poseidon/fetched_message.rb', line 30 def initialize(topic, value, key, offset) @topic = topic @value = value @key = key @offset = offset end |
Instance Attribute Details
#key ⇒ Object (readonly)
28 29 30 |
# File 'lib/poseidon/fetched_message.rb', line 28 def key @key end |
#offset ⇒ Object (readonly)
28 29 30 |
# File 'lib/poseidon/fetched_message.rb', line 28 def offset @offset end |
#topic ⇒ Object (readonly)
28 29 30 |
# File 'lib/poseidon/fetched_message.rb', line 28 def topic @topic end |
#value ⇒ Object (readonly)
28 29 30 |
# File 'lib/poseidon/fetched_message.rb', line 28 def value @value end |