Method: Kafka.new

Defined in:
lib/kafka.rb

.new(seed_brokers = nil, **options) ⇒ Client

Initializes a new Kafka client.

Returns:

See Also:


362
363
364
365
366
367
368
369
370
# File 'lib/kafka.rb', line 362

def self.new(seed_brokers = nil, **options)
  # We allow `seed_brokers` to be passed in either as a positional _or_ as a
  # keyword argument.
  if seed_brokers.nil?
    Client.new(**options)
  else
    Client.new(seed_brokers: seed_brokers, **options)
  end
end