lib/rrj/rabbit/propertie.rb in ruby_rabbitmq_janus-1.1.12 vs lib/rrj/rabbit/propertie.rb in ruby_rabbitmq_janus-1.2.0

- old
+ new

@@ -1,10 +1,14 @@ # frozen_string_literal: true module RubyRabbitmqJanus module Rabbit # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv> + + # @!attribute [r] correlation + # @return [String] Is a string uniq generated by SecureRandom + # # Manage properties to message sending in rabbitmq queue class Propertie attr_reader :correlation # Initialize a message sending to rabbitmq @@ -15,30 +19,23 @@ # Define options sending to rabbitmq def options Tools::Log.instance.debug 'Add options to propertie to message' { - routing_key: Tools::Config.instance.options['queues']['queue_to'], + routing_key: Tools::Config.instance.queue_to, correlation_id: @correlation, content_type: 'application/json' } end # Define option sending to rabbitmq for janus admin message def options_admin Tools::Log.instance.debug 'Add options to propertie to message' { - routing_key: routing_key, + routing_key: Tools::Config.instance.queue_admin_to, correlation_id: @correlation, content_type: 'application/json' } - end - - private - - # Read configuration file to gem for reading a admin queue name - def routing_key - Tools::Config.instance.options['queues']['admin']['queue_to'] end end end end