Constructor and Description |
---|
KafkaConfiguration() |
Modifier and Type | Method and Description |
---|---|
KafkaConfiguration |
copy()
Returns a copy of this configuration
|
Properties |
createConsumerProperties() |
Properties |
createProducerProperties() |
Integer |
getAutoCommitIntervalMs() |
String |
getAutoOffsetReset() |
int |
getBarrierAwaitTimeoutMs() |
Integer |
getBatchNumMessages() |
int |
getBatchSize() |
String |
getBrokers() |
String |
getClientId() |
String |
getCompressedTopics() |
String |
getCompressionCodec() |
String |
getConsumerId() |
int |
getConsumersCount() |
int |
getConsumerStreams() |
Integer |
getConsumerTimeoutMs() |
Integer |
getFetchMessageMaxBytes() |
Integer |
getFetchMinBytes() |
Integer |
getFetchWaitMaxMs() |
String |
getGroupId() |
String |
getKeySerializerClass() |
Integer |
getMessageSendMaxRetries() |
String |
getOffsetsStorage() |
String |
getPartitioner() |
String |
getProducerType() |
Integer |
getQueueBufferingMaxMessages() |
Integer |
getQueueBufferingMaxMs() |
Integer |
getQueuedMaxMessageChunks() |
Integer |
getQueueEnqueueTimeoutMs() |
Integer |
getRebalanceBackoffMs() |
Integer |
getRebalanceMaxRetries() |
Integer |
getRefreshLeaderBackoffMs() |
short |
getRequestRequiredAcks() |
Integer |
getRequestTimeoutMs() |
Integer |
getRetryBackoffMs() |
Integer |
getSendBufferBytes() |
String |
getSerializerClass() |
Integer |
getSocketReceiveBufferBytes() |
Integer |
getSocketTimeoutMs() |
String |
getTopic() |
Integer |
getTopicMetadataRefreshIntervalMs() |
String |
getZookeeperConnect() |
Integer |
getZookeeperConnectionTimeoutMs() |
String |
getZookeeperHost() |
int |
getZookeeperPort() |
Integer |
getZookeeperSessionTimeoutMs() |
Integer |
getZookeeperSyncTimeMs() |
Boolean |
isAutoCommitEnable() |
Boolean |
isDualCommitEnabled() |
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 |
setBatchNumMessages(Integer batchNumMessages)
The number of messages to send in one batch when using async mode.
|
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 |
setClientId(String clientId)
The client id is a user-specified string sent in each request to help trace calls.
|
void |
setCompressedTopics(String compressedTopics)
This parameter allows you to set whether compression should be turned on for particular topics.
|
void |
setCompressionCodec(String compressionCodec)
This parameter allows you to specify the compression codec for all data generated by this producer.
|
void |
setConsumerId(String consumerId)
Generated automatically if not set.
|
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 |
setConsumerTimeoutMs(Integer consumerTimeoutMs)
Throw a timeout exception to the consumer if no message is available for consumption after the specified interval
|
void |
setDualCommitEnabled(Boolean dualCommitEnabled)
If you are using "kafka" as offsets.storage, you can dual commit offsets to ZooKeeper (in addition to Kafka).
|
void |
setFetchMessageMaxBytes(Integer fetchMessageMaxBytes)
The number of byes of messages to attempt to fetch for each topic-partition in each fetch request.
|
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 |
setKeySerializerClass(String keySerializerClass)
The serializer class for keys (defaults to the same as for messages if nothing is given).
|
void |
setMessageSendMaxRetries(Integer messageSendMaxRetries)
This property will cause the producer to automatically retry a failed send request.
|
void |
setOffsetsStorage(String offsetsStorage)
Select where offsets should be stored (zookeeper or kafka).
|
void |
setPartitioner(String partitioner)
The partitioner class for partitioning messages amongst sub-topics.
|
void |
setProducerType(String producerType)
This parameter specifies whether the messages are sent asynchronously in a background thread.
|
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 |
setQueueBufferingMaxMs(Integer queueBufferingMaxMs)
Maximum time to buffer data when using async mode.
|
void |
setQueuedMaxMessageChunks(Integer queuedMaxMessageChunks)
Max number of message chunks buffered for consumption.
|
void |
setQueueEnqueueTimeoutMs(Integer queueEnqueueTimeoutMs)
The amount of time to block before dropping messages when running in async mode and the buffer has reached
queue.buffering.max.messages.
|
void |
setRebalanceBackoffMs(Integer rebalanceBackoffMs)
Backoff time between retries during rebalance.
|
void |
setRebalanceMaxRetries(Integer rebalanceMaxRetries)
When a new consumer joins a consumer group the set of consumers attempt to "rebalance" the load to assign partitions to each consumer.
|
void |
setRefreshLeaderBackoffMs(Integer refreshLeaderBackoffMs)
Backoff time to wait before trying to determine the leader of a partition that has just lost its leader.
|
void |
setRequestRequiredAcks(short requestRequiredAcks)
This value controls when a produce request is considered completed.
|
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 |
setRetryBackoffMs(Integer retryBackoffMs)
Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected.
|
void |
setSendBufferBytes(Integer sendBufferBytes)
Socket write buffer size
|
void |
setSerializerClass(String serializerClass)
The serializer class for messages.
|
void |
setSocketReceiveBufferBytes(Integer socketReceiveBufferBytes)
The socket receive buffer for network requests
|
void |
setSocketTimeoutMs(Integer socketTimeoutMs)
The socket timeout for network requests.
|
void |
setTopic(String topic)
Name of the topic to use
|
void |
setTopicMetadataRefreshIntervalMs(Integer topicMetadataRefreshIntervalMs)
The producer generally refreshes the topic metadata from brokers when there is a failure (partition missing,
leader not available...).
|
void |
setZookeeperConnect(String zookeeperConnect)
Specifies the ZooKeeper connection string in the form hostname:port where host and port are the host and port of a ZooKeeper server.
|
void |
setZookeeperConnectionTimeoutMs(Integer zookeeperConnectionTimeoutMs)
The max time that the client waits while establishing a connection to zookeeper.
|
void |
setZookeeperHost(String zookeeperHost)
The zookeeper host to use.
|
void |
setZookeeperPort(int zookeeperPort)
The zookeeper port to use
To connect to multiple zookeeper hosts use the zookeeperConnect option instead.
|
void |
setZookeeperSessionTimeoutMs(Integer zookeeperSessionTimeoutMs)
ZooKeeper session timeout.
|
void |
setZookeeperSyncTimeMs(Integer zookeeperSyncTimeMs)
How far a ZK follower can be behind a ZK leader
|
public Properties createProducerProperties()
public Properties createConsumerProperties()
public String getZookeeperConnect()
public void setZookeeperConnect(String zookeeperConnect)
public String getZookeeperHost()
public void setZookeeperHost(String zookeeperHost)
public int getZookeeperPort()
public void setZookeeperPort(int zookeeperPort)
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 Integer getSocketTimeoutMs()
public void setSocketTimeoutMs(Integer socketTimeoutMs)
public Integer getSocketReceiveBufferBytes()
public void setSocketReceiveBufferBytes(Integer socketReceiveBufferBytes)
public Integer getFetchMessageMaxBytes()
public void setFetchMessageMaxBytes(Integer fetchMessageMaxBytes)
public Boolean isAutoCommitEnable()
public void setAutoCommitEnable(Boolean autoCommitEnable)
public Integer getAutoCommitIntervalMs()
public void setAutoCommitIntervalMs(Integer autoCommitIntervalMs)
public Integer getQueuedMaxMessageChunks()
public void setQueuedMaxMessageChunks(Integer queuedMaxMessageChunks)
public Integer getRebalanceMaxRetries()
public void setRebalanceMaxRetries(Integer rebalanceMaxRetries)
public Integer getFetchMinBytes()
public void setFetchMinBytes(Integer fetchMinBytes)
public Integer getFetchWaitMaxMs()
public void setFetchWaitMaxMs(Integer fetchWaitMaxMs)
public Integer getRebalanceBackoffMs()
public void setRebalanceBackoffMs(Integer rebalanceBackoffMs)
public Integer getRefreshLeaderBackoffMs()
public void setRefreshLeaderBackoffMs(Integer refreshLeaderBackoffMs)
public String getAutoOffsetReset()
public void setAutoOffsetReset(String autoOffsetReset)
public Integer getConsumerTimeoutMs()
public void setConsumerTimeoutMs(Integer consumerTimeoutMs)
public Integer getZookeeperSessionTimeoutMs()
public void setZookeeperSessionTimeoutMs(Integer zookeeperSessionTimeoutMs)
public Integer getZookeeperConnectionTimeoutMs()
public void setZookeeperConnectionTimeoutMs(Integer zookeeperConnectionTimeoutMs)
public Integer getZookeeperSyncTimeMs()
public void setZookeeperSyncTimeMs(Integer zookeeperSyncTimeMs)
public String getBrokers()
public void setBrokers(String brokers)
public String getProducerType()
public void setProducerType(String producerType)
public String getCompressionCodec()
public void setCompressionCodec(String compressionCodec)
public String getCompressedTopics()
public void setCompressedTopics(String compressedTopics)
public Integer getMessageSendMaxRetries()
public void setMessageSendMaxRetries(Integer messageSendMaxRetries)
public Integer getRetryBackoffMs()
public void setRetryBackoffMs(Integer retryBackoffMs)
public Integer getTopicMetadataRefreshIntervalMs()
public void setTopicMetadataRefreshIntervalMs(Integer topicMetadataRefreshIntervalMs)
public Integer getSendBufferBytes()
public void setSendBufferBytes(Integer sendBufferBytes)
public short getRequestRequiredAcks()
public void setRequestRequiredAcks(short requestRequiredAcks)
public Integer getRequestTimeoutMs()
public void setRequestTimeoutMs(Integer requestTimeoutMs)
public Integer getQueueBufferingMaxMs()
public void setQueueBufferingMaxMs(Integer queueBufferingMaxMs)
public Integer getQueueBufferingMaxMessages()
public void setQueueBufferingMaxMessages(Integer queueBufferingMaxMessages)
public Integer getQueueEnqueueTimeoutMs()
public void setQueueEnqueueTimeoutMs(Integer queueEnqueueTimeoutMs)
public Integer getBatchNumMessages()
public void setBatchNumMessages(Integer batchNumMessages)
public String getSerializerClass()
public void setSerializerClass(String serializerClass)
public String getKeySerializerClass()
public void setKeySerializerClass(String keySerializerClass)
public String getOffsetsStorage()
public void setOffsetsStorage(String offsetsStorage)
public Boolean isDualCommitEnabled()
public void setDualCommitEnabled(Boolean dualCommitEnabled)
public KafkaConfiguration copy()
Apache Camel