constructor({
    connectionPool,
    logger,
    nodeId = null,
    versions = null,
    authenticationTimeout = 10000,
    allowAutoTopicCreation = true,
  }) {
    this.connectionPool = connectionPool
    this.nodeId = nodeId
    this.rootLogger = logger
    this.logger = logger.namespace('Broker')
    this.versions = versions
    this.authenticationTimeout = authenticationTimeout
    this.allowAutoTopicCreation = allowAutoTopicCreation

    // The lock timeout has twice the connectionTimeout because the same timeout is used
    // for the first apiVersions call
    const lockTimeout = 2 * this.connectionPool.connectionTimeout + this.authenticationTimeout
    this.brokerAddress = `${this.connectionPool.host}:${this.connectionPool.port}`

    this.lock = new Lock({
      timeout: lockTimeout,
      description: `connect to broker ${this.brokerAddress}`,
    })

    this.lookupRequest = notInitializedLookup
  }
@param {Object} options
@param {import("../network/connectionPool")} options.connectionPool
@param {import("../../types").Logger} options.logger
@param {number} [options.nodeId]
@param {import("../../types").ApiVersions} [options.versions=null] The object with all available versions and APIs
                                supported by this cluster. The output of broker#apiVersions
@param {number} [options.authenticationTimeout=10000]
@param {boolean} [options.allowAutoTopicCreation=true] If this and the broker config 'auto.create.topics.enable'
                                               are true, topics that don't exist will be created when
                                               fetching metadata.