Sha256: 2ec03fdd74ed5d5a90d68e049b5e25941c1f4ce6c08c125e6e8935988f80705c

Contents?: true

Size: 718 Bytes

Versions: 1

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

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)
          raise 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.4 lib/basquiat/adapters/rabbitmq/requeue_strategies/base_strategy.rb