class Kafka::Connection

def initialize(host:, port:, client_id:, logger:, instrumenter:, connect_timeout: nil, socket_timeout: nil, ssl_context: nil)

Returns:
  • (Connection) - a new connection.

Parameters:
  • socket_timeout (Integer) -- the socket timeout for reading and writing to the
  • connect_timeout (Integer) -- the socket timeout for connecting to the broker.
  • logger (Logger) -- the logger used to log trace messages.
  • client_id (String) -- the client id is a user-specified string sent in each
  • port (Integer) -- the port of the broker.
  • host (String) -- the hostname of the broker.
def initialize(host:, port:, client_id:, logger:, instrumenter:, connect_timeout: nil, socket_timeout: nil, ssl_context: nil)
  @host, @port, @client_id = host, port, client_id
  @logger = logger
  @instrumenter = instrumenter
  @connect_timeout = connect_timeout || CONNECT_TIMEOUT
  @socket_timeout = socket_timeout || SOCKET_TIMEOUT
  @ssl_context = ssl_context
end