Class: RubyRabbitmqJanus::Rabbit::Propertie
- Inherits:
-
Object
- Object
- RubyRabbitmqJanus::Rabbit::Propertie
- Defined in:
- lib/rrj/rabbit/propertie.rb
Overview
Manage properties to message sending in rabbitmq queue
Instance Attribute Summary collapse
-
#correlation ⇒ Object
readonly
Returns the value of attribute correlation.
Instance Method Summary collapse
-
#initialize ⇒ Propertie
constructor
Initialize a message sending to rabbitmq.
-
#options ⇒ Object
Define options sending to rabbitmq.
-
#options_admin ⇒ Object
Define option sending to rabbitmq for janus admin message.
Constructor Details
#initialize ⇒ Propertie
Initialize a message sending to rabbitmq
11 12 13 14 |
# File 'lib/rrj/rabbit/propertie.rb', line 11 def initialize Tools::Log.instance.debug 'initalize a propertie to message' @correlation = SecureRandom.uuid end |
Instance Attribute Details
#correlation ⇒ Object (readonly)
Returns the value of attribute correlation.
8 9 10 |
# File 'lib/rrj/rabbit/propertie.rb', line 8 def correlation @correlation end |
Instance Method Details
#options ⇒ Object
Define options sending to rabbitmq
17 18 19 20 21 22 23 24 |
# File 'lib/rrj/rabbit/propertie.rb', line 17 def Tools::Log.instance.debug 'Add options to propertie to message' { routing_key: Tools::Config.instance.['queues']['queue_to'], correlation_id: @correlation, content_type: 'application/json' } end |
#options_admin ⇒ Object
Define option sending to rabbitmq for janus admin message
27 28 29 30 31 32 33 34 |
# File 'lib/rrj/rabbit/propertie.rb', line 27 def Tools::Log.instance.debug 'Add options to propertie to message' { routing_key: Tools::Config.instance.['queues']['admin']['queue_to'], correlation_id: @correlation, content_type: 'application/json' } end |