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-2.7.2.pre.306 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.305 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.302 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.297 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.296 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.286 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.285 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.2.pre.284 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.1 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.1.pre.274 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.0.pre.272 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.0 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.0.pre.269 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.7.0.pre.267 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.263 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.261 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.260 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.259 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.258 lib/rrj/rabbit/publisher/keepalive.rb