Sha256: a14757c248a5c733fcd7bfd1ff31e848f16f90ed66f83676853da4ed7b08a87d

Contents?: true

Size: 824 Bytes

Versions: 72

Compression:

Stored size: 824 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Processing
    # Basic partitioner for work division
    # It does not divide any work.
    class Partitioner
      # @param subscription_group [Karafka::Routing::SubscriptionGroup] subscription group
      def initialize(subscription_group)
        @subscription_group = subscription_group
      end

      # @param _topic [String] topic name
      # @param messages [Array<Karafka::Messages::Message>] karafka messages
      # @param _coordinator [Karafka::Processing::Coordinator] processing coordinator that will
      #   be used with those messages
      # @yieldparam [Integer] group id
      # @yieldparam [Array<Karafka::Messages::Message>] karafka messages
      def call(_topic, messages, _coordinator)
        yield(0, messages)
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
karafka-2.3.3 lib/karafka/processing/partitioner.rb
karafka-2.3.2 lib/karafka/processing/partitioner.rb
karafka-2.3.1 lib/karafka/processing/partitioner.rb
karafka-2.3.0 lib/karafka/processing/partitioner.rb
karafka-2.3.0.rc1 lib/karafka/processing/partitioner.rb
karafka-2.3.0.alpha2 lib/karafka/processing/partitioner.rb
karafka-2.3.0.alpha1 lib/karafka/processing/partitioner.rb
karafka-2.2.14 lib/karafka/processing/partitioner.rb
karafka-2.2.13 lib/karafka/processing/partitioner.rb
karafka-2.2.12 lib/karafka/processing/partitioner.rb
karafka-2.2.11 lib/karafka/processing/partitioner.rb
karafka-2.2.10 lib/karafka/processing/partitioner.rb
karafka-2.2.9 lib/karafka/processing/partitioner.rb
karafka-2.2.8 lib/karafka/processing/partitioner.rb
karafka-2.2.8.beta1 lib/karafka/processing/partitioner.rb
karafka-2.2.7 lib/karafka/processing/partitioner.rb
karafka-2.2.6 lib/karafka/processing/partitioner.rb
karafka-2.2.5 lib/karafka/processing/partitioner.rb
karafka-2.2.4 lib/karafka/processing/partitioner.rb
karafka-2.2.3 lib/karafka/processing/partitioner.rb