Class: Karafka::Processing::Partitioner

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/processing/partitioner.rb

Overview

Basic partitioner for work division It does not divide any work.

Direct Known Subclasses

Karafka::Pro::Processing::Partitioner

Instance Method Summary collapse

Constructor Details

#initialize(subscription_group) ⇒ Partitioner

Returns a new instance of Partitioner.

Parameters:



9
10
11
# File 'lib/karafka/processing/partitioner.rb', line 9

def initialize(subscription_group)
  @subscription_group = subscription_group
end

Instance Method Details

#call(_topic, messages, _coordinator) {|group, karafka| ... } ⇒ Object

Parameters:

Yield Parameters:



19
20
21
# File 'lib/karafka/processing/partitioner.rb', line 19

def call(_topic, messages, _coordinator)
  yield(0, messages)
end