@UriParams public class KafkaConfiguration extends Object
Constructor and Description |
---|
KafkaConfiguration() |
Modifier and Type | Method and Description |
---|---|
Properties |
createConsumerProperties() |
Properties |
createProducerProperties() |
Integer |
getAutoCommitIntervalMs() |
String |
getAutoOffsetReset() |
int |
getBarrierAwaitTimeoutMs() |
int |
getBatchSize() |
String |
getBrokers() |
Integer |
getBufferMemorySize() |
Boolean |
getCheckCrcs() |
String |
getClientId() |
String |
getCompressionCodec() |
Integer |
getConnectionMaxIdleMs() |
String |
getConsumerId() |
Integer |
getConsumerRequestTimeoutMs() |
int |
getConsumersCount() |
int |
getConsumerStreams() |
Integer |
getFetchMinBytes() |
Integer |
getFetchWaitMaxMs() |
String |
getGroupId() |
Integer |
getHeartbeatIntervalMs() |
Integer |
getKerberosBeforeReloginMinTime() |
String |
getKerberosInitCmd() |
Double |
getKerberosRenewJitter() |
Double |
getKerberosRenewWindowFactor() |
String |
getKeyDeserializer() |
String |
getKeySerializerClass() |
Integer |
getLingerMs() |
Integer |
getMaxBlockMs() |
Integer |
getMaxInFlightRequest() |
Integer |
getMaxPartitionFetchBytes() |
Integer |
getMaxRequestSize() |
Integer |
getMetadataMaxAgeMs() |
String |
getMetricReporters() |
Integer |
getMetricsSampleWindowMs() |
Integer |
getNoOfMetricsSample() |
String |
getPartitionAssignor() |
String |
getPartitioner() |
Integer |
getProducerBatchSize() |
Integer |
getQueueBufferingMaxMessages() |
Integer |
getReceiveBufferBytes() |
Integer |
getReconnectBackoffMs() |
String |
getRequestRequiredAcks() |
Integer |
getRequestTimeoutMs() |
Integer |
getRetries() |
Integer |
getRetryBackoffMs() |
String |
getSaslKerberosServiceName() |
String |
getSecurityProtocol() |
Integer |
getSendBufferBytes() |
String |
getSerializerClass() |
Integer |
getSessionTimeoutMs() |
String |
getSslCipherSuites() |
String |
getSslEnabledProtocols() |
String |
getSslEndpointAlgorithm() |
String |
getSslKeymanagerAlgorithm() |
String |
getSslKeyPassword() |
String |
getSslKeystoreLocation() |
String |
getSslKeystorePassword() |
String |
getSslKeystoreType() |
String |
getSslProtocol() |
String |
getSslProvider() |
String |
getSslTrustmanagerAlgorithm() |
String |
getSslTruststoreLocation() |
String |
getSslTruststorePassword() |
String |
getSslTruststoreType() |
String |
getTopic() |
String |
getValueDeserializer() |
ExecutorService |
getWorkerPool() |
Integer |
getWorkerPoolCoreSize() |
Integer |
getWorkerPoolMaxSize() |
Boolean |
isAutoCommitEnable() |
void |
setAutoCommitEnable(Boolean autoCommitEnable)
If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer.
|
void |
setAutoCommitIntervalMs(Integer autoCommitIntervalMs)
The frequency in ms that the consumer offsets are committed to zookeeper.
|
void |
setAutoOffsetReset(String autoOffsetReset)
What to do when there is no initial offset in ZooKeeper or if an offset is out of range:
smallest : automatically reset the offset to the smallest offset
largest : automatically reset the offset to the largest offset
fail: throw exception to the consumer
|
void |
setBarrierAwaitTimeoutMs(int barrierAwaitTimeoutMs)
If the BatchingConsumerTask processes exchange exceed the batchSize, it will wait for barrierAwaitTimeoutMs.
|
void |
setBatchSize(int batchSize)
The batchSize that the BatchingConsumerTask processes once.
|
void |
setBrokers(String brokers)
This is for bootstrapping and the producer will only use it for getting metadata (topics, partitions and replicas).
|
void |
setBufferMemorySize(Integer bufferMemorySize)
The total bytes of memory the producer can use to buffer records waiting to be sent to the server.
|
void |
setCheckCrcs(Boolean checkCrcs)
Automatically check the CRC32 of the records consumed.
|
void |
setClientId(String clientId)
The client id is a user-specified string sent in each request to help trace calls.
|
void |
setCompressionCodec(String compressionCodec)
This parameter allows you to specify the compression codec for all data generated by this producer.
|
void |
setConnectionMaxIdleMs(Integer connectionMaxIdleMs)
Close idle connections after the number of milliseconds specified by this config.
|
void |
setConsumerId(String consumerId)
Generated automatically if not set.
|
void |
setConsumerRequestTimeoutMs(Integer consumerRequestTimeoutMs)
The configuration controls the maximum amount of time the client will wait for the response
of a request.
|
void |
setConsumersCount(int consumersCount)
The number of consumers that connect to kafka server
|
void |
setConsumerStreams(int consumerStreams)
Number of concurrent consumers on the consumer
|
void |
setFetchMinBytes(Integer fetchMinBytes)
The minimum amount of data the server should return for a fetch request.
|
void |
setFetchWaitMaxMs(Integer fetchWaitMaxMs)
The maximum amount of time the server will block before answering the fetch request if there isn't sufficient data to immediately satisfy fetch.min.bytes
|
void |
setGroupId(String groupId)
A string that uniquely identifies the group of consumer processes to which this consumer belongs.
|
void |
setHeartbeatIntervalMs(Integer heartbeatIntervalMs)
The expected time between heartbeats to the consumer coordinator when using Kafka's group management facilities.
|
void |
setKerberosBeforeReloginMinTime(Integer kerberosBeforeReloginMinTime)
Login thread sleep time between refresh attempts.
|
void |
setKerberosInitCmd(String kerberosInitCmd)
Kerberos kinit command path.
|
void |
setKerberosRenewJitter(Double kerberosRenewJitter)
Percentage of random jitter added to the renewal time.
|
void |
setKerberosRenewWindowFactor(Double kerberosRenewWindowFactor)
Login thread will sleep until the specified window factor of time from last
refresh to ticket's expiry has been reached, at which time it will try to renew the ticket.
|
void |
setKeyDeserializer(String keyDeserializer)
Deserializer class for key that implements the Deserializer interface.
|
void |
setKeySerializerClass(String keySerializerClass)
The serializer class for keys (defaults to the same as for messages if nothing is given).
|
void |
setLingerMs(Integer lingerMs)
The producer groups together any records that arrive in between request transmissions into a single batched request.
|
void |
setMaxBlockMs(Integer maxBlockMs)
The configuration controls how long sending to kafka will block.
|
void |
setMaxInFlightRequest(Integer maxInFlightRequest)
The maximum number of unacknowledged requests the client will send on a single connection before blocking.
|
void |
setMaxPartitionFetchBytes(Integer maxPartitionFetchBytes)
The maximum amount of data per-partition the server will return.
|
void |
setMaxRequestSize(Integer maxRequestSize)
The maximum size of a request.
|
void |
setMetadataMaxAgeMs(Integer metadataMaxAgeMs)
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.
|
void |
setMetricReporters(String metricReporters)
A list of classes to use as metrics reporters.
|
void |
setMetricsSampleWindowMs(Integer metricsSampleWindowMs)
The number of samples maintained to compute metrics.
|
void |
setNoOfMetricsSample(Integer noOfMetricsSample)
The number of samples maintained to compute metrics.
|
void |
setPartitionAssignor(String partitionAssignor)
The class name of the partition assignment strategy that the client will use to distribute
partition ownership amongst consumer instances when group management is used
|
void |
setPartitioner(String partitioner)
The partitioner class for partitioning messages amongst sub-topics.
|
void |
setProducerBatchSize(Integer producerBatchSize)
The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition.
|
void |
setQueueBufferingMaxMessages(Integer queueBufferingMaxMessages)
The maximum number of unsent messages that can be queued up the producer when using async
mode before either the producer must be blocked or data must be dropped.
|
void |
setReceiveBufferBytes(Integer receiveBufferBytes)
The size of the TCP receive buffer (SO_RCVBUF) to use when reading data.
|
void |
setReconnectBackoffMs(Integer reconnectBackoffMs)
The amount of time to wait before attempting to reconnect to a given host.
|
void |
setRequestRequiredAcks(String requestRequiredAcks)
The number of acknowledgments the producer requires the leader to have received before considering a request complete.
|
void |
setRequestTimeoutMs(Integer requestTimeoutMs)
The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client.
|
void |
setRetries(Integer retries)
Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.
|
void |
setRetryBackoffMs(Integer retryBackoffMs)
Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected.
|
void |
setSaslKerberosServiceName(String saslKerberosServiceName)
The Kerberos principal name that Kafka runs as.
|
void |
setSecurityProtocol(String securityProtocol)
Protocol used to communicate with brokers.
|
void |
setSendBufferBytes(Integer sendBufferBytes)
Socket write buffer size
|
void |
setSerializerClass(String serializerClass)
The serializer class for messages.
|
void |
setSessionTimeoutMs(Integer sessionTimeoutMs)
The timeout used to detect failures when using Kafka's group management facilities.
|
void |
setSslCipherSuites(String sslCipherSuites)
A list of cipher suites.
|
void |
setSslEnabledProtocols(String sslEnabledProtocols)
The list of protocols enabled for SSL connections.
|
void |
setSslEndpointAlgorithm(String sslEndpointAlgorithm)
The endpoint identification algorithm to validate server hostname using server certificate.
|
void |
setSslKeymanagerAlgorithm(String sslKeymanagerAlgorithm)
The algorithm used by key manager factory for SSL connections.
|
void |
setSslKeyPassword(String sslKeyPassword)
The password of the private key in the key store file.
|
void |
setSslKeystoreLocation(String sslKeystoreLocation)
The location of the key store file.
|
void |
setSslKeystorePassword(String sslKeystorePassword)
The store password for the key store file.This is optional for client and only needed
if ssl.keystore.location is configured.
|
void |
setSslKeystoreType(String sslKeystoreType)
The file format of the key store file.
|
void |
setSslProtocol(String sslProtocol)
The SSL protocol used to generate the SSLContext.
|
void |
setSslProvider(String sslProvider)
The name of the security provider used for SSL connections.
|
void |
setSslTrustmanagerAlgorithm(String sslTrustmanagerAlgorithm)
The algorithm used by trust manager factory for SSL connections.
|
void |
setSslTruststoreLocation(String sslTruststoreLocation)
The location of the trust store file.
|
void |
setSslTruststorePassword(String sslTruststorePassword)
The password for the trust store file.
|
void |
setSslTruststoreType(String sslTruststoreType)
The file format of the trust store file.
|
void |
setTopic(String topic)
Name of the topic to use.
|
void |
setValueDeserializer(String valueDeserializer)
Deserializer class for value that implements the Deserializer interface.
|
void |
setWorkerPool(ExecutorService workerPool)
To use a custom worker pool for continue routing
Exchange after kafka server has acknowledge
the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. |
void |
setWorkerPoolCoreSize(Integer workerPoolCoreSize)
Number of core threads for the worker pool for continue routing
Exchange after kafka server has acknowledge
the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. |
void |
setWorkerPoolMaxSize(Integer workerPoolMaxSize)
Maximum number of threads for the worker pool for continue routing
Exchange after kafka server has acknowledge
the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. |
public Properties createProducerProperties()
public Properties createConsumerProperties()
public String getGroupId()
public void setGroupId(String groupId)
public String getPartitioner()
public void setPartitioner(String partitioner)
public String getTopic()
public void setTopic(String topic)
public int getConsumerStreams()
public void setConsumerStreams(int consumerStreams)
public int getBatchSize()
public void setBatchSize(int batchSize)
public int getBarrierAwaitTimeoutMs()
public void setBarrierAwaitTimeoutMs(int barrierAwaitTimeoutMs)
public int getConsumersCount()
public void setConsumersCount(int consumersCount)
public String getClientId()
public void setClientId(String clientId)
public String getConsumerId()
public void setConsumerId(String consumerId)
public Boolean isAutoCommitEnable()
public void setAutoCommitEnable(Boolean autoCommitEnable)
public Integer getAutoCommitIntervalMs()
public void setAutoCommitIntervalMs(Integer autoCommitIntervalMs)
public Integer getFetchMinBytes()
public void setFetchMinBytes(Integer fetchMinBytes)
public Integer getFetchWaitMaxMs()
public void setFetchWaitMaxMs(Integer fetchWaitMaxMs)
public String getAutoOffsetReset()
public void setAutoOffsetReset(String autoOffsetReset)
public String getBrokers()
public void setBrokers(String brokers)
public String getCompressionCodec()
public void setCompressionCodec(String compressionCodec)
public Integer getRetryBackoffMs()
public void setRetryBackoffMs(Integer retryBackoffMs)
public Integer getSendBufferBytes()
public void setSendBufferBytes(Integer sendBufferBytes)
public Integer getRequestTimeoutMs()
public void setRequestTimeoutMs(Integer requestTimeoutMs)
public Integer getQueueBufferingMaxMessages()
public void setQueueBufferingMaxMessages(Integer queueBufferingMaxMessages)
public String getSerializerClass()
public void setSerializerClass(String serializerClass)
public String getKeySerializerClass()
public void setKeySerializerClass(String keySerializerClass)
public String getKerberosInitCmd()
public void setKerberosInitCmd(String kerberosInitCmd)
public Integer getKerberosBeforeReloginMinTime()
public void setKerberosBeforeReloginMinTime(Integer kerberosBeforeReloginMinTime)
public Double getKerberosRenewJitter()
public void setKerberosRenewJitter(Double kerberosRenewJitter)
public Double getKerberosRenewWindowFactor()
public void setKerberosRenewWindowFactor(Double kerberosRenewWindowFactor)
public String getSslCipherSuites()
public void setSslCipherSuites(String sslCipherSuites)
public String getSslEndpointAlgorithm()
public void setSslEndpointAlgorithm(String sslEndpointAlgorithm)
public String getSslKeymanagerAlgorithm()
public void setSslKeymanagerAlgorithm(String sslKeymanagerAlgorithm)
public String getSslTrustmanagerAlgorithm()
public void setSslTrustmanagerAlgorithm(String sslTrustmanagerAlgorithm)
public String getSslEnabledProtocols()
public void setSslEnabledProtocols(String sslEnabledProtocols)
public String getSslKeystoreType()
public void setSslKeystoreType(String sslKeystoreType)
public String getSslProtocol()
public void setSslProtocol(String sslProtocol)
public String getSslProvider()
public void setSslProvider(String sslProvider)
public String getSslTruststoreType()
public void setSslTruststoreType(String sslTruststoreType)
public String getSaslKerberosServiceName()
public void setSaslKerberosServiceName(String saslKerberosServiceName)
public String getSecurityProtocol()
public void setSecurityProtocol(String securityProtocol)
public String getSslKeyPassword()
public void setSslKeyPassword(String sslKeyPassword)
public String getSslKeystoreLocation()
public void setSslKeystoreLocation(String sslKeystoreLocation)
public String getSslKeystorePassword()
public void setSslKeystorePassword(String sslKeystorePassword)
public String getSslTruststoreLocation()
public void setSslTruststoreLocation(String sslTruststoreLocation)
public String getSslTruststorePassword()
public void setSslTruststorePassword(String sslTruststorePassword)
public Integer getBufferMemorySize()
public void setBufferMemorySize(Integer bufferMemorySize)
public String getRequestRequiredAcks()
public void setRequestRequiredAcks(String requestRequiredAcks)
public Integer getRetries()
public void setRetries(Integer retries)
public Integer getProducerBatchSize()
public void setProducerBatchSize(Integer producerBatchSize)
public Integer getConnectionMaxIdleMs()
public void setConnectionMaxIdleMs(Integer connectionMaxIdleMs)
public Integer getLingerMs()
public void setLingerMs(Integer lingerMs)
public Integer getMaxBlockMs()
public void setMaxBlockMs(Integer maxBlockMs)
public Integer getMaxRequestSize()
public void setMaxRequestSize(Integer maxRequestSize)
public Integer getReceiveBufferBytes()
public void setReceiveBufferBytes(Integer receiveBufferBytes)
public Integer getMaxInFlightRequest()
public void setMaxInFlightRequest(Integer maxInFlightRequest)
public Integer getMetadataMaxAgeMs()
public void setMetadataMaxAgeMs(Integer metadataMaxAgeMs)
public String getMetricReporters()
public void setMetricReporters(String metricReporters)
public Integer getNoOfMetricsSample()
public void setNoOfMetricsSample(Integer noOfMetricsSample)
public Integer getMetricsSampleWindowMs()
public void setMetricsSampleWindowMs(Integer metricsSampleWindowMs)
public Integer getReconnectBackoffMs()
public void setReconnectBackoffMs(Integer reconnectBackoffMs)
public Integer getHeartbeatIntervalMs()
public void setHeartbeatIntervalMs(Integer heartbeatIntervalMs)
public Integer getMaxPartitionFetchBytes()
public void setMaxPartitionFetchBytes(Integer maxPartitionFetchBytes)
public Integer getSessionTimeoutMs()
public void setSessionTimeoutMs(Integer sessionTimeoutMs)
public String getPartitionAssignor()
public void setPartitionAssignor(String partitionAssignor)
public Integer getConsumerRequestTimeoutMs()
public void setConsumerRequestTimeoutMs(Integer consumerRequestTimeoutMs)
public Boolean getCheckCrcs()
public void setCheckCrcs(Boolean checkCrcs)
public String getKeyDeserializer()
public void setKeyDeserializer(String keyDeserializer)
public String getValueDeserializer()
public void setValueDeserializer(String valueDeserializer)
public ExecutorService getWorkerPool()
public void setWorkerPool(ExecutorService workerPool)
Exchange
after kafka server has acknowledge
the message that was sent to it from KafkaProducer
using asynchronous non-blocking processing.public Integer getWorkerPoolCoreSize()
public void setWorkerPoolCoreSize(Integer workerPoolCoreSize)
Exchange
after kafka server has acknowledge
the message that was sent to it from KafkaProducer
using asynchronous non-blocking processing.public Integer getWorkerPoolMaxSize()
public void setWorkerPoolMaxSize(Integer workerPoolMaxSize)
Exchange
after kafka server has acknowledge
the message that was sent to it from KafkaProducer
using asynchronous non-blocking processing.Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.