Sha256: cffeb94eabe34efc74ec845981420d3779efbb3a4bc0252ebf926edbe8b5857d

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 Bytes

Contents

module Basquiat
  module Adapters
    class RabbitMq
      class BaseStrategy
        class << self
          def session_options
            {}
          end

          def setup(options = {})
            @options = options
          end
        end

        def initialize(session)
          @session = session
        end

        def run(_message)
          fail Basquiat::Errors::SubclassResponsibility
        end

        def ack(message)
          @session.channel.ack(message.delivery_tag)
        end

        def nack(message)
          @session.channel.nack(message.delivery_tag, false)
        end

        private

        attr_reader :session
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
basquiat-1.3.0.pre.1 lib/basquiat/adapters/rabbitmq/requeue_strategies/base_strategy.rb