Class: Karafka::Processing::ConsumerGroups::Jobs::Revoked

Inherits:
Jobs::Base
  • Object
show all
Defined in:
lib/karafka/processing/consumer_groups/jobs/revoked.rb

Overview

Job that runs the revoked operation when we lose a partition on a consumer that lost it.

Instance Attribute Summary

Attributes inherited from Jobs::Base

#executor

Instance Method Summary collapse

Methods inherited from Jobs::Base

#after_call, #before_call, #finish!, #finished?, #non_blocking?, #wrap

Constructor Details

#initialize(executor) ⇒ Revoked

Parameters:



16
17
18
19
# File 'lib/karafka/processing/consumer_groups/jobs/revoked.rb', line 16

def initialize(executor)
  @executor = executor
  super()
end

Instance Method Details

#before_scheduleObject

Runs code prior to scheduling this revoked job



22
23
24
# File 'lib/karafka/processing/consumer_groups/jobs/revoked.rb', line 22

def before_schedule
  executor.before_schedule_revoked
end

#callObject

Runs the revoking job via an executor.



27
28
29
# File 'lib/karafka/processing/consumer_groups/jobs/revoked.rb', line 27

def call
  executor.revoked
end