Class: Rabbitek::Message
- Inherits:
-
Object
- Object
- Rabbitek::Message
- Defined in:
- lib/rabbitek/server/message.rb
Overview
A model representing message that consumer receives to process
Instance Attribute Summary collapse
-
#delivery_info ⇒ Object
readonly
Returns the value of attribute delivery_info.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#raw_payload ⇒ Object
readonly
Returns the value of attribute raw_payload.
Instance Method Summary collapse
-
#initialize(payload:, properties:, delivery_info:) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(payload:, properties:, delivery_info:) ⇒ Message
Returns a new instance of Message.
12 13 14 15 16 17 18 |
# File 'lib/rabbitek/server/message.rb', line 12 def initialize(payload:, properties:, delivery_info:) @payload = Utils::Oj.load(payload) @properties = properties @delivery_info = delivery_info @raw_payload = payload end |
Instance Attribute Details
#delivery_info ⇒ Object (readonly)
Returns the value of attribute delivery_info.
7 8 9 |
# File 'lib/rabbitek/server/message.rb', line 7 def delivery_info @delivery_info end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
7 8 9 |
# File 'lib/rabbitek/server/message.rb', line 7 def payload @payload end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
7 8 9 |
# File 'lib/rabbitek/server/message.rb', line 7 def properties @properties end |
#raw_payload ⇒ Object (readonly)
Returns the value of attribute raw_payload.
7 8 9 |
# File 'lib/rabbitek/server/message.rb', line 7 def raw_payload @raw_payload end |