Sha256: a039a787cd74768646cb82edc64b0e9efd9670c3dac6d3154e647217b475dca4

Contents?: true

Size: 1.32 KB

Versions: 6

Compression:

Stored size: 1.32 KB

Contents

# frozen_string_literal: true

module Karafka
  module Routing
    module Features
      class DeadLetterQueue < Base
        # Config for dead letter queue feature
        Config = Struct.new(
          :active,
          # We add skip variants but in regular we support only `:one`
          :max_retries,
          # To what topic the skipped messages should be moved
          :topic,
          # Should retries be handled collectively on a batch or independently per message
          :independent,
          # Move to DLQ and mark as consumed in transactional mode (if applicable)
          :transactional,
          # Strategy to apply (if strategies supported)
          :strategy,
          # Should we use `#produce_sync` or `#produce_async`
          :dispatch_method,
          # Should we use `#mark_as_consumed` or `#mark_as_consumed!` (in flows that mark)
          :marking_method,
          # Should we mark as consumed after dispatch or not. True for most cases, except MOM where
          # it is on user to decide (false by default)
          :mark_after_dispatch,
          # Initialize with kwargs
          keyword_init: true
        ) do
          alias_method :active?, :active
          alias_method :independent?, :independent
          alias_method :transactional?, :transactional
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
karafka-2.4.14 lib/karafka/routing/features/dead_letter_queue/config.rb
karafka-2.4.13 lib/karafka/routing/features/dead_letter_queue/config.rb
karafka-2.4.12 lib/karafka/routing/features/dead_letter_queue/config.rb
karafka-2.4.11 lib/karafka/routing/features/dead_letter_queue/config.rb
karafka-2.4.10 lib/karafka/routing/features/dead_letter_queue/config.rb
karafka-2.4.9 lib/karafka/routing/features/dead_letter_queue/config.rb