Class: RubyRabbitmqJanus::Rabbit::Publisher::PublisherAdmin
- Inherits:
-
RubyRabbitmqJanus::Rabbit::Publisher
- Object
- RubyRabbitmqJanus::Rabbit::Publisher
- RubyRabbitmqJanus::Rabbit::Publisher::PublisherAdmin
- Defined in:
- lib/rrj/rabbit/publish/admin.rb
Overview
This publisher send and read an message in admin queues
Instance Method Summary collapse
-
#initialize(exchange) ⇒ PublisherAdmin
constructor
Intialize an queue non eclusive for admin/monitor API with Janus.
-
#publish(request) ⇒ Janus::Response::Standard
Send an message to queue and waiting a response.
Constructor Details
#initialize(exchange) ⇒ PublisherAdmin
Intialize an queue non eclusive for admin/monitor API with Janus
12 13 14 15 16 17 18 |
# File 'lib/rrj/rabbit/publish/admin.rb', line 12 def initialize(exchange) @reply = exchange.queue(Tools::Config.instance.queue_admin_from) super(exchange) subscribe_to_queue rescue raise Errors::Rabbit::PublisherAdmin::Initialize end |
Instance Method Details
#publish(request) ⇒ Janus::Response::Standard
Send an message to queue and waiting a response
26 27 28 29 30 31 |
# File 'lib/rrj/rabbit/publish/admin.rb', line 26 def publish(request) super(request) return_response rescue raise Errors::Rabbit::PublisherAdmin::Pusblish end |