Class: RubyRabbitmqJanus::Rabbit::Publisher::Keepalive
- Defined in:
- lib/rrj/rabbit/publisher/keepalive.rb
Overview
# Publish message for keepalive thread
The name to queue it’s created automatically by Bunny GEM
Instance Attribute Summary
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(exchange) ⇒ Keepalive
constructor
A new instance of Keepalive.
- #publish(request) ⇒ Object
Constructor Details
#initialize(exchange) ⇒ Keepalive
14 15 16 17 18 19 20 |
# File 'lib/rrj/rabbit/publisher/keepalive.rb', line 14 def initialize(exchange) @reply = exchange.queue('', exclusive: true) super(exchange) subscribe_to_queue rescue raise Errors::Rabbit::Publisher::Keepalive::Initialize end |
Instance Method Details
#publish(request) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/rrj/rabbit/publisher/keepalive.rb', line 22 def publish(request) super(request) return_response rescue raise Errors::Rabbit::Publisher::Keepalive::Publish end |