Class: RubyRabbitmqJanus::Rabbit::Publisher::Exclusive
- Defined in:
- lib/rrj/rabbit/publisher/exclusive.rb
Overview
# Publish message
Publish message in queue exclusive. Bunny create automaticaly a name for this queue. The queue name like to ‘amq.gen-1A456DGVHDVUS’.
Instance Attribute Summary
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(exchange, name_queue) ⇒ Exclusive
constructor
Initialize an queue exclusive and generated automaticaly by bunny.
-
#publish(request) ⇒ Janus::Response::Standard
Send an message to queue and waiting a response.
Constructor Details
#initialize(exchange, name_queue) ⇒ Exclusive
Initialize an queue exclusive and generated automaticaly by bunny
17 18 19 20 21 22 23 |
# 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 rescue raise Errors::Rabbit::Publisher::Exclusive::Initialize end |