Sha256: 77fae2604d846892bbad50e072fc72be41172ac30c780c0797f6bdada3e14930

Contents?: true

Size: 381 Bytes

Versions: 3

Compression:

Stored size: 381 Bytes

Contents

require 'jruby-kafka'

require_relative 'base'


module Anschel
  class Input
    class Kafka < Base
      def initialize queue, config, stats, log
        @consumer_group = ::Kafka::Group.new config
        @consumer_group.run num_cpus, queue
      end

      def stop
        return if @stopped
        @consumer_group.shutdown
        @stopped = true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
anschel-0.6.4 lib/anschel/input/kafka.rb
anschel-0.6.3 lib/anschel/input/kafka.rb
anschel-0.6.2 lib/anschel/input/kafka.rb