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.4.17 lib/karafka/processing/partitioner.rb
karafka-2.4.16 lib/karafka/processing/partitioner.rb
karafka-2.4.15 lib/karafka/processing/partitioner.rb
karafka-2.4.14 lib/karafka/processing/partitioner.rb
karafka-2.4.13 lib/karafka/processing/partitioner.rb
karafka-2.4.12 lib/karafka/processing/partitioner.rb
karafka-2.4.11 lib/karafka/processing/partitioner.rb
karafka-2.4.10 lib/karafka/processing/partitioner.rb
karafka-2.4.9 lib/karafka/processing/partitioner.rb
karafka-2.4.8 lib/karafka/processing/partitioner.rb
karafka-2.4.7 lib/karafka/processing/partitioner.rb
karafka-2.4.6 lib/karafka/processing/partitioner.rb
karafka-2.4.5 lib/karafka/processing/partitioner.rb
karafka-2.4.4 lib/karafka/processing/partitioner.rb
karafka-2.4.3 lib/karafka/processing/partitioner.rb
karafka-2.4.0 lib/karafka/processing/partitioner.rb
karafka-2.4.0.rc1 lib/karafka/processing/partitioner.rb
karafka-2.3.4 lib/karafka/processing/partitioner.rb
karafka-2.4.0.beta2 lib/karafka/processing/partitioner.rb
karafka-2.4.0.beta1 lib/karafka/processing/partitioner.rb