class RubyRabbitmqJanus::Rabbit::Publisher::Exclusive
@author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
# Publish message
Publish message in queue exclusive. Bunny create automaticaly a name for this queue. The queue name like to 'amq.gen-1A456DGVHDVUS'.
Attributes
reply[R]
Public Class Methods
new(exchange, name_queue)
click to toggle source
Initialize an queue exclusive and generated automaticaly by bunny
@param [String] exchange Exchange used for the transaction @param [String] name_queue Name to queue exclusive
Calls superclass method
RubyRabbitmqJanus::Rabbit::Publisher::Base::new
# File lib/rrj/rabbit/publisher/exclusive.rb, line 17 def initialize(exchange, name_queue) @reply = exchange.queue(name_queue, exclusive: true) super(exchange) subscribe_to_queue end
Public Instance Methods
publish(request)
click to toggle source
Send an message to queue and waiting a response
@param [String] request JSON request sending to rabbitmq queue
@return [Janus::Response::Standard] response for an request reading
by janus instance
Calls superclass method
RubyRabbitmqJanus::Rabbit::Publisher::Base#publish
# File lib/rrj/rabbit/publisher/exclusive.rb, line 29 def publish(request) super(request) return_response end