Class: Karafka::Pro::Processing::Jobs::RevokedNonBlocking

Inherits:
Karafka::Processing::Jobs::Revoked show all
Defined in:
lib/karafka/pro/processing/jobs/revoked_non_blocking.rb

Overview

The revoked job type in a non-blocking variant. This variant works “like” the regular revoked but does not block the queue.

It can be useful when having long lasting jobs that would exceed max.poll.interval in scenarios where there are more jobs than threads, without this being async we would potentially stop polling

Instance Attribute Summary

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

#executor

Instance Method Summary collapse

Methods inherited from Karafka::Processing::Jobs::Revoked

#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) ⇒ RevokedNonBlocking

Makes this job non-blocking from the start

Parameters:

  • args (Array)

    any arguments accepted by ::Karafka::Processing::Jobs::Revoked



29
30
31
32
# File 'lib/karafka/pro/processing/jobs/revoked_non_blocking.rb', line 29

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