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.6.0.pre.247 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.246 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.244 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.240 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.239 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.238 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.233 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.229 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.228 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.227 lib/rrj/rabbit/publisher/keepalive.rb
ruby_rabbitmq_janus-2.6.0.pre.226 lib/rrj/rabbit/publisher/keepalive.rb