Sha256: b0438e1fd1ad77df823979fcf9a58bead75444e0ced747880a6574fe093052ae

Contents?: true

Size: 825 Bytes

Versions: 51

Compression:

Stored size: 825 Bytes

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  module Rabbit
    module Publisher
      # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
      #
      # # Publish message for keepalive thread
      #
      # The name to queue it's created automatically by Bunny GEM
      #
      # @see KeepaliveThread
      class Keepalive < Base
        def initialize(exchange)
          @reply = exchange.queue('', exclusive: true)
          super(exchange)
          subscribe_to_queue
        rescue
          raise Errors::Rabbit::Publisher::Keepalive::Initialize
        end

        def publish(request)
          super(request)
          return_response
        rescue
          raise Errors::Rabbit::Publisher::Keepalive::Publish
        end

        private

        attr_reader :reply
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-3.0.0.pre.336 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-3.0.0.pre.335 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-3.0.0.pre.334 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-3.0.0.pre.330 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-3.0.0.pre.328 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-3.0.0.pre.327 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.322 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.320 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.319 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.318 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.317 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.316 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.315 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.314 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.312 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.310 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.309 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.308 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.307 lib/rrj/rabbit/publisher/keepalive.rb