Module: Karafka::Pro::Processing::Strategies::Mom::Default

Includes:
Default
Included in:
Aj::Mom, Ftr, Vp
Defined in:
lib/karafka/pro/processing/strategies/mom/default.rb

Overview

Manual offset management enabled

Constant Summary collapse

FEATURES =

Features for this strategy

%i[
  manual_offset_management
].freeze

Instance Method Summary collapse

Methods included from Default

#handle_before_consume, #handle_before_enqueue, #handle_consume, #handle_revoked

Methods included from Karafka::Processing::Strategies::Default

#commit_offsets, #commit_offsets!, #handle_before_consume, #handle_before_enqueue, #handle_consume, #handle_idle, #handle_revoked, #handle_shutdown, #mark_as_consumed, #mark_as_consumed!

Methods included from Karafka::Processing::Strategies::Base

#handle_before_consume, #handle_before_enqueue, #handle_consume, #handle_idle, #handle_revoked, #handle_shutdown

Instance Method Details

#handle_after_consumeObject

When mom is enabled, we do not mark messages as consumed after processing



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/karafka/pro/processing/strategies/mom/default.rb', line 30

def handle_after_consume
  coordinator.on_finished do
    return if revoked?

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