Name | Kind | Type | Required | Deprecated | Default Value | Enum Values | Description |
---|---|---|---|---|---|---|---|
brokers | path | java.lang.String | false | This is for bootstrapping and the producer will only use it for getting metadata (topics, partitions and replicas). The socket connections for sending the actual data will be established based on the broker information returned in the metadata. The format is host1:port1,host2:port2, and the list can be a subset of brokers or a VIP pointing to a subset of brokers. This option is known as metadata.broker.list in the Kafka documentation. | |||
zookeeperConnect | parameter | java.lang.String | false | Specifies the ZooKeeper connection string in the form hostname:port where host and port are the host and port of a ZooKeeper server. To allow connecting through other ZooKeeper nodes when that ZooKeeper machine is down you can also specify multiple hosts in the form hostname1:port1,hostname2:port2,hostname3:port3. The server may also have a ZooKeeper chroot path as part of it's ZooKeeper connection string which puts its data under some path in the global ZooKeeper namespace. If so the consumer should use the same chroot path in its connection string. For example to give a chroot path of /chroot/path you would give the connection string as hostname1:port1,hostname2:port2,hostname3:port3/chroot/path. | |||
zookeeperHost | parameter | java.lang.String | false | The zookeeper host to use. To connect to multiple zookeeper hosts use the zookeeperConnect option instead. This option can only be used if zookeeperConnect is not in use. | |||
zookeeperPort | parameter | int | false | 2181 | The zookeeper port to use To connect to multiple zookeeper hosts use the zookeeperConnect option instead. This option can only be used if zookeeperConnect is not in use. | ||
topic | parameter | java.lang.String | true | false | Name of the topic to use | ||
groupId | parameter | java.lang.String | false | A string that uniquely identifies the group of consumer processes to which this consumer belongs. By setting the same group id multiple processes indicate that they are all part of the same consumer group. | |||
partitioner | parameter | java.lang.String | false | DefaultPartitioner | The partitioner class for partitioning messages amongst sub-topics. The default partitioner is based on the hash of the key. | ||
consumerStreams | parameter | int | false | 10 | Number of concurrent consumers on the consumer | ||
consumersCount | parameter | int | false | 1 | The number of consumers that connect to kafka server | ||
batchSize | parameter | int | false | 100 | The batchSize that the BatchingConsumerTask processes once. | ||
barrierAwaitTimeoutMs | parameter | int | false | 10000 | If the BatchingConsumerTask processes exchange exceed the batchSize, it will wait for barrierAwaitTimeoutMs. | ||
clientId | parameter | java.lang.String | false | The client id is a user-specified string sent in each request to help trace calls. It should logically identify the application making the request. | |||
consumerId | parameter | java.lang.String | false | Generated automatically if not set. | |||
socketTimeoutMs | parameter | java.lang.Integer | false | 30000 | The socket timeout for network requests. The actual timeout set will be max.fetch.wait + socket.timeout.ms. | ||
socketReceiveBufferBytes | parameter | java.lang.Integer | false | 65536 | The socket receive buffer for network requests | ||
fetchMessageMaxBytes | parameter | java.lang.Integer | false | 1048576 | The number of byes of messages to attempt to fetch for each topic-partition in each fetch request. These bytes will be read into memory for each partition, so this helps control the memory used by the consumer. The fetch request size must be at least as large as the maximum message size the server allows or else it is possible for the producer to send messages larger than the consumer can fetch. | ||
autoCommitEnable | parameter | java.lang.Boolean | false | true | If true, periodically commit to ZooKeeper the offset of messages already fetched by the consumer. This committed offset will be used when the process fails as the position from which the new consumer will begin. | ||
autoCommitIntervalMs | parameter | java.lang.Integer | false | 60000 | The frequency in ms that the consumer offsets are committed to zookeeper. | ||
queuedMaxMessageChunks | parameter | java.lang.Integer | false | 2 | Max number of message chunks buffered for consumption. Each chunk can be up to fetch.message.max.bytes. | ||
rebalanceMaxRetries | parameter | java.lang.Integer | false | 4 | When a new consumer joins a consumer group the set of consumers attempt to "rebalance" the load to assign partitions to each consumer. If the set of consumers changes while this assignment is taking place the rebalance will fail and retry. This setting controls the maximum number of attempts before giving up. | ||
fetchMinBytes | parameter | java.lang.Integer | false | 1 | The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait for that much data to accumulate before answering the request. | ||
fetchWaitMaxMs | parameter | java.lang.Integer | false | 100 | 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 | ||
rebalanceBackoffMs | parameter | java.lang.Integer | false | 2000 | Backoff time between retries during rebalance. | ||
refreshLeaderBackoffMs | parameter | java.lang.Integer | false | 200 | Backoff time to wait before trying to determine the leader of a partition that has just lost its leader. | ||
autoOffsetReset | parameter | java.lang.String | false | largest | smallest largest fail |
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 | |
consumerTimeoutMs | parameter | java.lang.Integer | false | Throw a timeout exception to the consumer if no message is available for consumption after the specified interval | |||
zookeeperSessionTimeoutMs | parameter | java.lang.Integer | false | ZooKeeper session timeout. If the consumer fails to heartbeat to ZooKeeper for this period of time it is considered dead and a rebalance will occur. | |||
zookeeperConnectionTimeoutMs | parameter | java.lang.Integer | false | The max time that the client waits while establishing a connection to zookeeper. | |||
zookeeperSyncTimeMs | parameter | java.lang.Integer | false | How far a ZK follower can be behind a ZK leader | |||
producerType | parameter | java.lang.String | false | sync | async sync |
This parameter specifies whether the messages are sent asynchronously in a background thread. Valid values are (1) async for asynchronous send and (2) sync for synchronous send. By setting the producer to async we allow batching together of requests (which is great for throughput) but open the possibility of a failure of the client machine dropping unsent data. | |
compressionCodec | parameter | java.lang.String | false | none | none gzip snappy |
This parameter allows you to specify the compression codec for all data generated by this producer. Valid values are "none", "gzip" and "snappy". | |
compressedTopics | parameter | java.lang.String | false | This parameter allows you to set whether compression should be turned on for particular topics. If the compression codec is anything other than NoCompressionCodec, enable compression only for specified topics if any. If the list of compressed topics is empty, then enable the specified compression codec for all topics. If the compression codec is NoCompressionCodec, compression is disabled for all topics | |||
messageSendMaxRetries | parameter | java.lang.Integer | false | 3 | This property will cause the producer to automatically retry a failed send request. This property specifies the number of retries when such failures occur. Note that setting a non-zero value here can lead to duplicates in the case of network errors that cause a message to be sent but the acknowledgement to be lost. | ||
retryBackoffMs | parameter | java.lang.Integer | false | 100 | Before each retry, the producer refreshes the metadata of relevant topics to see if a new leader has been elected. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata. | ||
topicMetadataRefreshIntervalMs | parameter | java.lang.Integer | false | 600000 | The producer generally refreshes the topic metadata from brokers when there is a failure (partition missing, leader not available...). It will also poll regularly (default: every 10min so 600000ms). If you set this to a negative value, metadata will only get refreshed on failure. If you set this to zero, the metadata will get refreshed after each message sent (not recommended). Important note: the refresh happen only AFTER the message is sent, so if the producer never sends a message the metadata is never refreshed | ||
sendBufferBytes | parameter | java.lang.Integer | false | 102400 | Socket write buffer size | ||
requestRequiredAcks | parameter | short | false | 0 | This value controls when a produce request is considered completed. Specifically, how many other brokers must have committed the data to their log and acknowledged this to the leader? Typical values are (0, 1 or -1): 0, which means that the producer never waits for an acknowledgement from the broker (the same behavior as 0.7). This option provides the lowest latency but the weakest durability guarantees (some data will be lost when a server fails). 1, which means that the producer gets an acknowledgement after the leader replica has received the data. This option provides better durability as the client waits until the server acknowledges the request as successful (only messages that were written to the now-dead leader but not yet replicated will be lost). -1, The producer gets an acknowledgement after all in-sync replicas have received the data. This option provides the greatest level of durability. However, it does not completely eliminate the risk of message loss because the number of in sync replicas may, in rare cases, shrink to 1. If you want to ensure that some minimum number of replicas (typically a majority) receive a write, then you must set the topic-level min.insync.replicas setting. Please read the Replication section of the design documentation for a more in-depth discussion. | ||
requestTimeoutMs | parameter | java.lang.Integer | false | 10000 | The amount of time the broker will wait trying to meet the request.required.acks requirement before sending back an error to the client. | ||
queueBufferingMaxMs | parameter | java.lang.Integer | false | 5000 | Maximum time to buffer data when using async mode. For example a setting of 100 will try to batch together 100ms of messages to send at once. This will improve throughput but adds message delivery latency due to the buffering. | ||
queueBufferingMaxMessages | parameter | java.lang.Integer | false | 10000 | 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. | ||
queueEnqueueTimeoutMs | parameter | java.lang.Integer | false | The amount of time to block before dropping messages when running in async mode and the buffer has reached queue.buffering.max.messages. If set to 0 events will be enqueued immediately or dropped if the queue is full (the producer send call will never block). If set to -1 the producer will block indefinitely and never willingly drop a send. | |||
batchNumMessages | parameter | java.lang.Integer | false | 200 | The number of messages to send in one batch when using async mode. The producer will wait until either this number of messages are ready to send or queue.buffer.max.ms is reached. | ||
serializerClass | parameter | java.lang.String | false | The serializer class for messages. The default encoder takes a byte[] and returns the same byte[]. The default class is kafka.serializer.DefaultEncoder | |||
keySerializerClass | parameter | java.lang.String | false | The serializer class for keys (defaults to the same as for messages if nothing is given). | |||
bridgeEndpoint | parameter | boolean | false | false | If the option is true, then KafkaProducer will ignore the KafkaConstants.TOPIC header setting of the inbound message. | ||
exchangePattern | parameter | org.apache.camel.ExchangePattern | false | InOnly | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the default exchange pattern when creating an exchange | |
synchronous | parameter | boolean | false | false | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). |