Interface CommonClientConfigFields<T extends CommonClientConfigFields<T>>
- All Known Implementing Classes:
BaseCommonClientConfigBuilder,CommonClientConfigBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbootstrapServers(String value) bootstrap.serversbootstrapServers(List<String> value) bootstrap.serversclient.idconnectionsMaxIdleMs(Long value) connections.max.idle.msmetadataMaxAgeMs(Long value) metadata.max.age.msmetricReporters(String value) metric.reportersmetricReporters(List<String> value) metric.reportersmetricsNumSamples(Integer value) metrics.num.samplesmetricsRecordingLevel(String value) metrics.recording.levelmetricsSampleWindowMs(Long value) metrics.sample.window.msreceiveBufferBytes(Integer value) receive.buffer.bytesreconnectBackoffMaxMs(Long value) reconnect.backoff.max.msreconnectBackoffMs(Long value) reconnect.backoff.msrequestTimeoutMs(Integer value) request.timeout.msretryBackoffMs(Long value) retry.backoff.mssecurityProtocol(String value) security.protocoldefault Tself()sendBufferBytes(Integer value) send.buffer.bytes
-
Method Details
-
bootstrapServers
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 formhost1: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
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 formhost1: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
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
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
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
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
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
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
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
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
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
metrics.sample.window.ms
The window of time a metrics sample is computed over.Default: 30000 (30 seconds)
Valid Values: [0,...]
Importance: low
-
metricsNumSamples
metrics.num.samples
The number of samples maintained to compute metrics.Default: 2
Valid Values: [1,...]
Importance: low
-
metricReporters
metric.reporters
A list of classes to use as metrics reporters.
Implementing theorg.apache.kafka.common.metrics.MetricsReporterinterface 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
metric.reporters
A list of classes to use as metrics reporters.
Implementing theorg.apache.kafka.common.metrics.MetricsReporterinterface 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
metrics.recording.level
The highest recording level for metrics.Default: INFO
Valid Values: [INFO, DEBUG, TRACE]
Importance: low
-
securityProtocol
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
-