Sha256: e79e3596a639247b0b9823a1615ec6516c7de50251017b47ed6961319246d567

Contents?: true

Size: 771 Bytes

Versions: 75

Compression:

Stored size: 771 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Processing
    module Strategies
      # When using manual offset management, we do not mark as consumed after successful processing
      module Mom
        include Default

        # Apply strategy when only manual offset management is turned on
        FEATURES = %i[
          manual_offset_management
        ].freeze

        # When manual offset management is on, we do not mark anything as consumed automatically
        # and we rely on the user to figure things out
        def handle_after_consume
          return if revoked?

          if coordinator.success?
            coordinator.pause_tracker.reset
          else
            retry_after_pause
          end
        end
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
karafka-2.2.2 lib/karafka/processing/strategies/mom.rb
karafka-2.2.1 lib/karafka/processing/strategies/mom.rb
karafka-2.2.0 lib/karafka/processing/strategies/mom.rb
karafka-2.1.13 lib/karafka/processing/strategies/mom.rb
karafka-2.1.12 lib/karafka/processing/strategies/mom.rb
karafka-2.1.11 lib/karafka/processing/strategies/mom.rb
karafka-2.1.10 lib/karafka/processing/strategies/mom.rb
karafka-2.1.9 lib/karafka/processing/strategies/mom.rb
karafka-2.1.8 lib/karafka/processing/strategies/mom.rb
karafka-2.1.7 lib/karafka/processing/strategies/mom.rb
karafka-2.1.6 lib/karafka/processing/strategies/mom.rb
karafka-2.1.5 lib/karafka/processing/strategies/mom.rb
karafka-2.1.5.beta1 lib/karafka/processing/strategies/mom.rb
karafka-2.1.4 lib/karafka/processing/strategies/mom.rb
karafka-2.1.3 lib/karafka/processing/strategies/mom.rb
karafka-2.1.2 lib/karafka/processing/strategies/mom.rb
karafka-2.1.1 lib/karafka/processing/strategies/mom.rb
karafka-2.1.0 lib/karafka/processing/strategies/mom.rb
karafka-2.0.41 lib/karafka/processing/strategies/mom.rb
karafka-2.0.40 lib/karafka/processing/strategies/mom.rb