Class: Poseidon::MessageToSend
- Inherits:
-
Object
- Object
- Poseidon::MessageToSend
- Defined in:
- lib/poseidon/message_to_send.rb
Overview
Instance Attribute Summary collapse
- #key ⇒ Object readonly
- #topic ⇒ Object readonly
- #value ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(topic, value, key = nil) ⇒ MessageToSend
constructor
Create a new message for sending to a Kafka broker.
Constructor Details
#initialize(topic, value, key = nil) ⇒ MessageToSend
Create a new message for sending to a Kafka broker.
26 27 28 29 30 31 |
# File 'lib/poseidon/message_to_send.rb', line 26 def initialize(topic, value, key = nil) raise ArgumentError, "Must provide a non-nil topic" if topic.nil? @topic = topic @value = value @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
10 11 12 |
# File 'lib/poseidon/message_to_send.rb', line 10 def key @key end |
#topic ⇒ Object (readonly)
10 11 12 |
# File 'lib/poseidon/message_to_send.rb', line 10 def topic @topic end |
#value ⇒ Object (readonly)
10 11 12 |
# File 'lib/poseidon/message_to_send.rb', line 10 def value @value end |