Class: Karafka::Pro::Processing::Jobs::ConsumeNonBlocking

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

Overview

Note:

It needs to be working with a proper consumer that will handle the partition management. This layer of the framework knows nothing about Kafka messages consumption.

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

It can be useful when having long lasting jobs that would exceed max.poll.interval if would block.

Instance Attribute Summary

Attributes inherited from Karafka::Processing::Jobs::Consume

#messages

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

#executor

Instance Method Summary collapse

Methods inherited from Karafka::Processing::Jobs::Consume

#after_call, #before_call, #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) ⇒ ConsumeNonBlocking

Makes this job non-blocking from the start

Parameters:

  • args (Array)

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



31
32
33
34
# File 'lib/karafka/pro/processing/jobs/consume_non_blocking.rb', line 31

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