Module: Karafka::Processing::Strategies::Base

Included in:
Karafka::Pro::Processing::Strategies::Base, Default
Defined in:
lib/karafka/processing/strategies/base.rb

Overview

Base strategy that should be included in each strategy, just to ensure the API

Instance Method Summary collapse

Instance Method Details

#handle_after_consumeObject

Post-consumption handling

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/karafka/processing/strategies/base.rb', line 40

def handle_after_consume
  raise NotImplementedError, 'Implement in a subclass'
end

#handle_before_consumeObject

What should happen before we kick in the processing

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/karafka/processing/strategies/base.rb', line 30

def handle_before_consume
  raise NotImplementedError, 'Implement in a subclass'
end

#handle_consumeObject

What should happen in the processing

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/karafka/processing/strategies/base.rb', line 35

def handle_consume
  raise NotImplementedError, 'Implement in a subclass'
end

#handle_idleObject

Idle run handling

Raises:

  • (NotImplementedError)


45
46
47
# File 'lib/karafka/processing/strategies/base.rb', line 45

def handle_idle
  raise NotImplementedError, 'Implement in a subclass'
end

#handle_revokedObject

Revocation handling

Raises:

  • (NotImplementedError)


50
51
52
# File 'lib/karafka/processing/strategies/base.rb', line 50

def handle_revoked
  raise NotImplementedError, 'Implement in a subclass'
end

#handle_shutdownObject

Shutdown handling

Raises:

  • (NotImplementedError)


55
56
57
# File 'lib/karafka/processing/strategies/base.rb', line 55

def handle_shutdown
  raise NotImplementedError, 'Implement in a subclass'
end