Class: Karafka::Pro::Processing::Jobs::PeriodicNonBlocking

Inherits:
Periodic show all
Defined in:
lib/karafka/pro/processing/jobs/periodic_non_blocking.rb

Overview

Non-Blocking version of the Periodic job We use this version for LRJ topics for cases where saturated resources would not allow to run this job for extended period of time. Under such scenarios, if we would not use a non-blocking one, we would reach max.poll.interval.ms.

Instance Attribute Summary

Attributes inherited from Karafka::Processing::Jobs::Base

#executor

Instance Method Summary collapse

Methods inherited from Periodic

#before_schedule, #call

Methods inherited from Karafka::Processing::Jobs::Base

#after_call, #before_call, #before_schedule, #call, #finish!, #finished?, #non_blocking?

Constructor Details

#initialize(*args) ⇒ PeriodicNonBlocking

Returns a new instance of PeriodicNonBlocking.

Parameters:

  • args (Array)

    any arguments accepted by ‘::Karafka::Processing::Jobs::Periodic`



24
25
26
27
# File 'lib/karafka/pro/processing/jobs/periodic_non_blocking.rb', line 24

def initialize(*args)
  super
  @non_blocking = true
end