Class CommonClientConfigBuilder
- All Implemented Interfaces:
CommonClientConfigFields<CommonClientConfigBuilder>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbootstrapServers(String value) bootstrap.serversbootstrapServers(List<String> value) bootstrap.serversdefault <R> Rclient.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.msdefault CommonClientConfigBuilderreceiveBufferBytes(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.protocolsendBufferBytes(Integer value) send.buffer.bytesMethods inherited from class org.swisspush.kobuka.client.base.BaseCommonClientConfigBuilder
build, create, transformMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.swisspush.kobuka.client.base.CommonClientConfigFields
self
-
Constructor Details
-
CommonClientConfigBuilder
public CommonClientConfigBuilder()
-
-
Method Details
-
build
-
property
-
asSupplier
-
bootstrapServers
Description copied from interface:CommonClientConfigFieldsbootstrap.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
- Specified by:
bootstrapServersin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
bootstrapServers
Description copied from interface:CommonClientConfigFieldsbootstrap.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
- Specified by:
bootstrapServersin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
clientId
Description copied from interface:CommonClientConfigFieldsclient.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
- Specified by:
clientIdin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
metadataMaxAgeMs
Description copied from interface:CommonClientConfigFieldsmetadata.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
- Specified by:
metadataMaxAgeMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
sendBufferBytes
Description copied from interface:CommonClientConfigFieldssend.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
- Specified by:
sendBufferBytesin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
receiveBufferBytes
Description copied from interface:CommonClientConfigFieldsreceive.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
- Specified by:
receiveBufferBytesin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
reconnectBackoffMs
Description copied from interface:CommonClientConfigFieldsreconnect.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
- Specified by:
reconnectBackoffMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
reconnectBackoffMaxMs
Description copied from interface:CommonClientConfigFieldsreconnect.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
- Specified by:
reconnectBackoffMaxMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
retryBackoffMs
Description copied from interface:CommonClientConfigFieldsretry.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
- Specified by:
retryBackoffMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
requestTimeoutMs
Description copied from interface:CommonClientConfigFieldsrequest.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
- Specified by:
requestTimeoutMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
connectionsMaxIdleMs
Description copied from interface:CommonClientConfigFieldsconnections.max.idle.ms
Close idle connections after the number of milliseconds specified by this config.Default: 300000 (5 minutes)
Valid Values:
Importance: medium
- Specified by:
connectionsMaxIdleMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
metricsSampleWindowMs
Description copied from interface:CommonClientConfigFieldsmetrics.sample.window.ms
The window of time a metrics sample is computed over.Default: 30000 (30 seconds)
Valid Values: [0,...]
Importance: low
- Specified by:
metricsSampleWindowMsin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
metricsNumSamples
Description copied from interface:CommonClientConfigFieldsmetrics.num.samples
The number of samples maintained to compute metrics.Default: 2
Valid Values: [1,...]
Importance: low
- Specified by:
metricsNumSamplesin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
metricReporters
Description copied from interface:CommonClientConfigFieldsmetric.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
- Specified by:
metricReportersin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
metricReporters
Description copied from interface:CommonClientConfigFieldsmetric.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
- Specified by:
metricReportersin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
metricsRecordingLevel
Description copied from interface:CommonClientConfigFieldsmetrics.recording.level
The highest recording level for metrics.Default: INFO
Valid Values: [INFO, DEBUG, TRACE]
Importance: low
- Specified by:
metricsRecordingLevelin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-
securityProtocol
Description copied from interface:CommonClientConfigFieldssecurity.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
- Specified by:
securityProtocolin interfaceCommonClientConfigFields<T extends org.swisspush.kobuka.client.base.AbstractCommonClientConfigBuilder<T>>
-