Interface CommonClientConfigFields<T extends CommonClientConfigFields<T>>

All Known Implementing Classes:
BaseCommonClientConfigBuilder, CommonClientConfigBuilder

public interface CommonClientConfigFields<T extends CommonClientConfigFields<T>>
  • Method Details

    • bootstrapServers

      T bootstrapServers(List<String> value)

      bootstrap.servers

      A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
      The client will make use of all servers irrespective of which servers are specified here for bootstrapping—this list only impacts the initial hosts used to discover the full set of servers.
      This list should be in the form host1:port1,host2:port2,....
      Since these servers are just used for the initial connection to discover the full cluster membership (which may change dynamically), this list need not contain the full set of servers (you may want more than one, though, in case a server is down).

      Default:

      Valid Values:

      Importance: high

    • bootstrapServers

      T bootstrapServers(String value)

      bootstrap.servers

      A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
      The client will make use of all servers irrespective of which servers are specified here for bootstrapping—this list only impacts the initial hosts used to discover the full set of servers.
      This list should be in the form host1:port1,host2:port2,....
      Since these servers are just used for the initial connection to discover the full cluster membership (which may change dynamically), this list need not contain the full set of servers (you may want more than one, though, in case a server is down).

      Default:

      Valid Values:

      Importance: high

    • clientId

      T clientId(String value)

      client.id

      An id string to pass to the server when making requests.
      The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.

      Default: ""

      Valid Values:

      Importance: medium

    • metadataMaxAgeMs

      T metadataMaxAgeMs(Long value)

      metadata.max.age.ms

      The period of time in milliseconds after which we force a refresh of metadata even if we haven't seen any partition leadership changes to proactively discover any new brokers or partitions.

      Default: 300000 (5 minutes)

      Valid Values: [0,...]

      Importance: low

    • sendBufferBytes

      T sendBufferBytes(Integer value)

      send.buffer.bytes

      The size of the TCP send buffer (SO_SNDBUF) to use when sending data.
      If the value is -1, the OS default will be used.

      Default: 131072 (128 kibibytes)

      Valid Values: [-1,...]

      Importance: medium

    • receiveBufferBytes

      T receiveBufferBytes(Integer value)

      receive.buffer.bytes

      The size of the TCP receive buffer (SO_RCVBUF) to use when reading data.
      If the value is -1, the OS default will be used.

      Default: 65536 (64 kibibytes)

      Valid Values: [-1,...]

      Importance: medium

    • reconnectBackoffMs

      T reconnectBackoffMs(Long value)

      reconnect.backoff.ms

      The base amount of time to wait before attempting to reconnect to a given host.
      This avoids repeatedly connecting to a host in a tight loop.
      This backoff applies to all connection attempts by the client to a broker.

      Default: 50

      Valid Values: [0,...]

      Importance: low

    • reconnectBackoffMaxMs

      T reconnectBackoffMaxMs(Long value)

      reconnect.backoff.max.ms

      The maximum amount of time in milliseconds to wait when reconnecting to a broker that has repeatedly failed to connect.
      If provided, the backoff per host will increase exponentially for each consecutive connection failure, up to this maximum.
      After calculating the backoff increase, 20% random jitter is added to avoid connection storms.

      Default: 1000 (1 second)

      Valid Values: [0,...]

      Importance: low

    • retryBackoffMs

      T retryBackoffMs(Long value)

      retry.backoff.ms

      The amount of time to wait before attempting to retry a failed request.
      This avoids repeatedly sending requests in a tight loop under some failure scenarios.

      Default: 100

      Valid Values: [0,...]

      Importance: low

    • requestTimeoutMs

      T requestTimeoutMs(Integer value)

      request.timeout.ms

      The configuration controls the maximum amount of time the client will wait for the response of a request.
      If the response is not received before the timeout elapses the client will resend the request if necessary or fail the request if retries are exhausted.

      Default: 30000 (30 seconds)

      Valid Values: [0,...]

      Importance: medium

    • connectionsMaxIdleMs

      T connectionsMaxIdleMs(Long value)

      connections.max.idle.ms

      Close idle connections after the number of milliseconds specified by this config.

      Default: 300000 (5 minutes)

      Valid Values:

      Importance: medium

    • metricsSampleWindowMs

      T metricsSampleWindowMs(Long value)

      metrics.sample.window.ms

      The window of time a metrics sample is computed over.

      Default: 30000 (30 seconds)

      Valid Values: [0,...]

      Importance: low

    • metricsNumSamples

      T metricsNumSamples(Integer value)

      metrics.num.samples

      The number of samples maintained to compute metrics.

      Default: 2

      Valid Values: [1,...]

      Importance: low

    • metricReporters

      T metricReporters(List<String> value)

      metric.reporters

      A list of classes to use as metrics reporters.
      Implementing the org.apache.kafka.common.metrics.MetricsReporter interface allows plugging in classes that will be notified of new metric creation.
      The JmxReporter is always included to register JMX statistics.

      Default: ""

      Valid Values:

      Importance: low

    • metricReporters

      T metricReporters(String value)

      metric.reporters

      A list of classes to use as metrics reporters.
      Implementing the org.apache.kafka.common.metrics.MetricsReporter interface allows plugging in classes that will be notified of new metric creation.
      The JmxReporter is always included to register JMX statistics.

      Default: ""

      Valid Values:

      Importance: low

    • metricsRecordingLevel

      T metricsRecordingLevel(String value)

      metrics.recording.level

      The highest recording level for metrics.

      Default: INFO

      Valid Values: [INFO, DEBUG, TRACE]

      Importance: low

    • securityProtocol

      T securityProtocol(String value)

      security.protocol

      Protocol used to communicate with brokers.
      Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL.

      Default: PLAINTEXT

      Valid Values: [PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL]

      Importance: medium

    • self

      default T self()