Index: configuration08.html =================================================================== --- configuration08.html (revision 0) +++ configuration08.html (working copy) @@ -0,0 +1,497 @@ + + +

Configuration for Kafka 0.8

+ +

Important configuration properties for Kafka broker:

+ +

More details about server configuration can be found in the scala class kafka.server.KafkaConfig.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDefaultDescription
broker.idThe broker id for this server
log.dirs"/tmp/kafka-logs"The directories in which the log data is kept
zookeeper.connectnullZookeeper host string
message.max.bytes + 1000000 + The maximum size of message that the server can receive
num.network.threads3The number of network threads that the server uses for handling network requests
num.io.threads8The number of io threads that the server uses for carrying out network requests
queued.max.requests500The number of queued requests allowed before blocking the network threads
port6667The port to listen and accept connections on
host.namenull +

Hostname of broker. If this is set, it will only bind to this address. If this is not set, it will bind to all interfaces, and publish one to ZK

+
socket.send.buffer.bytes100 * 1024The SO_SNDBUFF buffer of the socket sever sockets
socket.receive.buffer.bytes100 * 1024The SO_RCVBUFF buffer of the socket sever sockets
socket.request.max.bytes100 * 1024 * 1024The maximum number of bytes in a socket request
num.partitions1The default number of log partitions per topic
log.segment.bytes1024 * 1024 * 1024The maximum size of a single log file
log.segment.bytes.per.topic""The maximum size of a single log file for some specific topic
log.roll.hours24 * 7The maximum time before a new log segment is rolled out
log.roll.hours.per.topic""The number of hours before rolling out a new log segment for some specific topic
log.retention.hours24 * 7The number of hours to keep a log file before deleting it
log.retention.hours.per.topic""The number of hours to keep a log file before deleting it for some specific topic
log.retention.bytes-1The maximum size of the log before deleting it
log.retention.bytes.per.topic""The maximum size of the log for some specific topic before deleting it
log.cleanup.interval.mins10The frequency in minutes that the log cleaner checks whether any log is eligible for deletion
log.index.size.max.bytes10 * 1024 * 1024The maximum size in bytes of the offset index
log.index.interval.bytes4096The interval with which we add an entry to the offset index
log.flush.interval.messages10000The number of messages accumulated on a log partition before messages are flushed to disk
log.flush.interval.ms.per.topic""The maximum time in ms that a message in selected topics is kept in memory before flushed to disk, e.g., topic1:3000,topic2:6000
log.flush.scheduler.interval.ms3000The frequency in ms that the log flusher checks whether any log needs to be flushed to disk
log.flush.interval.ms${log.flush.scheduler.interval.ms} + The maximum time in ms that a message in any topic is kept in memory before flushed to disk
auto.create.topics.enabletrueEnable auto creation of topic on the server
controller.socket.timeout.ms30000The socket timeout for controller-to-broker channels
controller.message.queue.size10The buffer size for controller-to-broker-channels
default.replication.factor1Default replication factors for automatically created topics
replica.lag.time.max.ms10000If a follower hasn't sent any fetch requests during this time, the leader will remove the follower from isr
replica.lag.max.messages4000If the lag in messages between a leader and a follower exceeds this number, the leader will remove the follower from isr
replica.socket.timeout.ms30 * 1000The socket timeout for network requests
replica.socket.receive.buffer.bytes64 * 1024The socket receive buffer for network requests
replica.fetch.max.bytes1024 * 1024The number of byes of messages to attempt to fetch
replica.fetch.wait.max.ms500Max wait time for each fetcher request issued by follower replicas
replica.fetch.min.bytes1Minimum bytes expected for each fetch response. If not enough bytes, wait up to replicaMaxWaitTimeMs
num.replica.fetchers1 +

Number of fetcher threads used to replicate messages from a source broker. Increasing this value can increase the degree of I/O parallelism in the follower broker.

+
replica.high.watermark.checkpoint.interval.ms5000LThe frequency with which the high watermark is saved out to disk
fetch.purgatory.purge.interval.requests10000The purge interval (in number of requests) of the fetch request purgatory
producer.purgatory.purge.interval.requests10000The purge interval (in number of requests) of the producer request purgatory
zookeeper.session.timeout.ms6000Zookeeper session timeout
zookeeper.connection.timeout.ms${zookeeper.session.timeout.ms}The max time that the client waits to establish a connection to zookeeper
zookeeper.sync.time.ms2000How far a ZK follower can be behind a ZK leader
+ + +

Important configuration properties for the high-level consumer:

+ +

More details about consumer configuration can be found in the scala class kafka.consumer.ConsumerConfig.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDefaultDescription
group.idA string that uniquely identifies a set of consumers within the same consumer group
zookeeper.connectnullZookeeper host string
consumer.idnull +

Generated automatically if not set.

+
socket.timeout.ms30 * 1000The socket timeout for network requests. The actual timeout set will be max.fetch.wait + socket.timeout.ms.
socket.receive.buffer.bytes64 * 1024The socket receive buffer for network requests
fetch.message.max.bytes1024 * 1024The number of byes of messages to attempt to fetch
auto.commit.enabletrueIf true, periodically commit to zookeeper the offset of messages already fetched by the consumer
auto.commit.interval.ms60 * 1000The frequency in ms that the consumer offsets are committed to zookeeper
queued.max.messages10Max number of messages buffered for consumption
rebalance.max.retries4Max number of retries during rebalance
fetch.min.bytes1The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will block
fetch.wait.max.ms100The 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
rebalance.backoff.ms${zookeeper.sync.time.ms}Backoff time between retries during rebalance
refresh.leader.backoff.ms200Backoff time to refresh the leader of a partition after it loses the current leader
auto.offset.reset"smallest" +

What to do 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
* anything else: throw exception to the consumer

+
consumer.timeout.ms-1Throw a timeout exception to the consumer if no message is available for consumption after the specified interval
client.id${group.id}Client id is specified by the kafka consumer client, used to distinguish different clients
zookeeper.session.timeout.ms 6000Zookeeper session timeout
zookeeper.connection.timeout.ms${zookeeper.session.timeout.ms} + The max time that the client waits to establish a connection to zookeeper
zookeeper.sync.time.ms 2000How far a ZK follower can be behind a ZK leader
+ + +

Important configuration properties for the producer:

+ +

More details about producer configuration can be found in the scala class kafka.producer.ProducerConfig.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDefaultDescription
metadata.broker.list +

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.

+
partitioner.class"kafka.producer.DefaultPartitioner"The partitioner class for partitioning events amongst sub-topics
producer.type"sync" +

This parameter specifies whether the messages are sent asynchronously or not. Valid values are - async for asynchronous send and sync for synchronous send

+
compression.codec"none" +

This parameter allows you to specify the compression codec for all data generated by this producer. The default is NoCompressionCodec

+
compressed.topicsnull +

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

+
message.send.max.retries3 +

The leader may be unavailable transiently, which can fail the sending of a message. This property specifies the number of retries when such failures occur.

+
retry.backoff.ms100 +

Before each retry, the producer refreshes the metadata of relevant topics. Since leader election takes a bit of time, this property specifies the amount of time that the producer waits before refreshing the metadata.

+
topic.metadata.refresh.interval.ms600* 1000 +

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

+
queue.buffering.max.ms5000Maximum time, in milliseconds, for buffering data on the producer queue
queue.buffering.max.messages10000The maximum size of the blocking queue for buffering on the producer
queue.enqueue.timeout.ms-1 +

Timeout for event enqueue:
* 0: events will be enqueued immediately or dropped if the queue is full
* -ve: enqueue will block indefinitely if the queue is full
* +ve: enqueue will block up to this many milliseconds if the queue is full

+
batch.num.messages200The number of messages batched at the producer
serializer.class"kafka.serializer.DefaultEncoder"The serializer class for values
key.serializer.class${serializer.class}The serializer class for keys (defaults to the same as for values)
send.buffer.bytes100 * 1024Socket write buffer size
client.id""The client application sending the producer requests
request.required.acks0 +

The required acks of the producer requests - negative value means ack after the replicas in ISR have caught up to the leader's offset corresponding to this produce request.

+
request.timeout.ms1500The ack timeout of the producer requests. Value must be non-negative and non-zero
+ + + + + + Index: configuration.html =================================================================== --- configuration.html (revision 1471549) +++ configuration.html (working copy) @@ -1,345 +1,7 @@ + +

Configuration

+ Kafka 0.7 Configuration
+ Kafka 0.8 Configuration -

Configuration

-

Important configuration properties for Kafka broker:

- -

More details about server configuration can be found in the scala class kafka.server.KafkaConfig.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
namedefaultdescription
brokeridnoneEach broker is uniquely identified by an id. This id serves as the brokers "name", and allows the broker to be moved to a different host/port without confusing consumers.
enable.zookeepertrueenable zookeeper registration in the server
log.flush.interval500Controls the number of messages accumulated in each topic (partition) before the data is flushed to disk and made available to consumers.
log.default.flush.scheduler.interval.ms3000Controls the interval at which logs are checked to see if they need to be flushed to disk. A background thread will run at a frequency specified by this parameter and will check each log to see if it has exceeded its flush.interval time, and if so it will flush it.
log.default.flush.interval.ms log.default.flush.scheduler.interval.msControls the maximum time that a message in any topic is kept in memory before flushed to disk. The value only makes sense if it's a multiple of log.default.flush.scheduler.interval -.ms
topic.flush.intervals.msnonePer-topic overrides for log.default.flush.interval.ms. Controls the maximum time that a message in selected topics is kept in memory before flushed to disk. The per-topic value only makes sense if it's a multiple of log.default.flush.scheduler.interval.ms. E.g., topic1:1000,topic2:2000
log.retention.hours168Controls how long a log file is retained.
topic.log.retention.hoursnoneTopic-specific retention time that overrides log.retention.hours, e.g., topic1:10,topic2:20
log.retention.size-1the maximum size of the log before deleting it. This controls how large a log is allowed to grow
log.cleanup.interval.mins10Controls how often the log cleaner checks logs eligible for deletion. A log file is eligible for deletion if it hasn't been modified for log.retention.hours hours.
log.dirnoneSpecifies the root directory in which all log data is kept.
log.file.size1*1024*1024*1024Controls the maximum size of a single log file.
max.socket.request.bytes104857600the maximum number of bytes in a socket request
monitoring.period.secs600the interval in which to measure performance statistics
num.threadsRuntime.getRuntime().availableProcessorsControls the number of worker threads in the broker to serve requests.
num.partitions1Specifies the default number of partitions per topic.
socket.send.buffer102400the SO_SNDBUFF buffer of the socket sever sockets
socket.receive.buffer102400the SO_RCVBUFF buffer of the socket sever sockets
topic.partition.count.mapnoneOverride parameter to control the number of partitions for selected topics. E.g., topic1:10,topic2:20
zk.connectlocalhost:2182/kafkaSpecifies the zookeeper connection string in the form hostname:port/chroot. Here the chroot is a base directory which is prepended to all path operations (this effectively namespaces all kafka znodes to allow sharing with other applications on the same zookeeper cluster)
zk.connectiontimeout.ms 6000Specifies the max time that the client waits to establish a connection to zookeeper.
zk.sessiontimeout.ms 6000The zookeeper session timeout.
zk.synctime.ms2000Max time for how far a ZK follower can be behind a ZK leader
- - -

Important configuration properties for the high-level consumer:

- -

More details about consumer configuration can be found in the scala class kafka.consumer.ConsumerConfig.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
propertydefaultdescription
groupidgroupidis a string that uniquely identifies a set of consumers within the same consumer group.
socket.timeout.ms30000controls the socket timeout for network requests
socket.buffersize64*1024controls the socket receive buffer for network requests
fetch.size300 * 1024controls the number of bytes of messages to attempt to fetch in one request to the Kafka server
backoff.increment.ms1000This parameter avoids repeatedly polling a broker node which has no new data. We will backoff every time we get an empty set -from the broker for this time period
queuedchunks.max100the high level consumer buffers the messages fetched from the server internally in blocking queues. This parameter controls -the size of those queues
autocommit.enabletrueif set to true, the consumer periodically commits to zookeeper the latest consumed offset of each partition.
autocommit.interval.ms 10000is the frequency that the consumed offsets are committed to zookeeper.
autooffset.resetsmallest
    -
  • smallest: automatically reset the offset to the smallest offset available on the broker.
  • -
  • largest : automatically reset the offset to the largest offset available on the broker.
  • -
  • anything else: throw an exception to the consumer.
  • -
-
consumer.timeout.ms-1By default, this value is -1 and a consumer blocks indefinitely if no new message is available for consumption. By setting the value to a positive integer, a timeout exception is thrown to the consumer if no message is available for consumption after the specified timeout value.
rebalance.retries.max 4max number of retries during rebalance
mirror.topics.whitelist""Whitelist of topics for this mirror's embedded consumer to consume. At most one of whitelist/blacklist may be specified.
mirror.topics.blacklist""Topics to skip mirroring. At most one of whitelist/blacklist may be specified
mirror.consumer.numthreads4The number of threads to be used per topic for the mirroring consumer, by default
- - -

Important configuration properties for the producer:

- -

More details about producer configuration can be found in the scala class kafka.producer.ProducerConfig.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
propertydefaultdescription
serializer.classkafka.serializer.DefaultEncoder. This is a no-op encoder. The serialization of data to Message should be handled outside the Producerclass that implements the kafka.serializer.Encoder<T> interface, used to encode data of type T into a Kafka message
partitioner.classkafka.producer.DefaultPartitioner<T> - uses the partitioning strategy hash(key)%num_partitions. If key is null, then it picks a random partition. class that implements the kafka.producer.Partitioner<K>, used to supply a custom partitioning strategy on the message key (of type K) that is specified through the ProducerData<K, T> object in the kafka.producer.Producer<T> send API
producer.typesyncthis parameter specifies whether the messages are sent asynchronously or not. Valid values are -
  • async for asynchronous batching send through kafka.producer.AyncProducer
  • sync for synchronous send through kafka.producer.SyncProducer
broker.listnull. Either this parameter or zk.connect needs to be specified by the user.For bypassing zookeeper based auto partition discovery, use this config to pass in static broker and per-broker partition information. Format-brokerid1:host1:port1, brokerid2:host2:port2. - If you use this option, the partitioner.class will be ignored and each producer request will be routed to a random broker partition.
zk.connectnull. Either this parameter or broker.partition.info needs to be specified by the userFor using the zookeeper based automatic broker discovery, use this config to pass in the zookeeper connection url to the zookeeper cluster where the Kafka brokers are registered.
buffer.size102400the socket buffer size, in bytes
connect.timeout.ms5000the maximum time spent by kafka.producer.SyncProducer trying to connect to the kafka broker. Once it elapses, the producer throws an ERROR and stops.
socket.timeout.ms30000The socket timeout in milliseconds
reconnect.interval 30000the number of produce requests after which kafka.producer.SyncProducer tears down the socket connection to the broker and establishes it again
max.message.size 1000000the maximum number of bytes that the kafka.producer.SyncProducer can send as a single message payload
compression.codec0 (No compression)This parameter allows you to specify the compression codec for all data generated by this producer.
compressed.topicsnullThis 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.
zk.read.num.retries3The producer using the zookeeper software load balancer maintains a ZK cache that gets updated by the zookeeper watcher listeners. During some events like a broker bounce, the producer ZK cache can get into an inconsistent state, for a small time period. In this time period, it could end up picking a broker partition that is unavailable. When this happens, the ZK cache needs to be updated. This parameter specifies the number of times the producer attempts to refresh this ZK cache.
- Options for Asynchronous Producers (producer.type=async) -
queue.time5000maximum time, in milliseconds, for buffering data on the producer queue. After it elapses, the buffered data in the producer queue is dispatched to the event.handler.
queue.size10000the maximum size of the blocking queue for buffering on the kafka.producer.AsyncProducer
batch.size 200the number of messages batched at the producer, before being dispatched to the event.handler
event.handlerkafka.producer.async.EventHandler<T>the class that implements kafka.producer.async.IEventHandler<T> used to dispatch a batch of produce requests, using an instance of kafka.producer.SyncProducer. -
event.handler.propsnullthe java.util.Properties() object used to initialize the custom event.handler through its init() API
callback.handlernullthe class that implements kafka.producer.async.CallbackHandler<T> used to inject callbacks at various stages of the kafka.producer.AsyncProducer pipeline. -
callback.handler.propsnullthe java.util.Properties() object used to initialize the custom callback.handler through its init() API
- - - Index: configuration07.html =================================================================== --- configuration07.html (revision 0) +++ configuration07.html (working copy) @@ -0,0 +1,350 @@ + + +

Configuration for Kafka 0.7

+ +

Important configuration properties for Kafka broker:

+ +

More details about server configuration can be found in the scala class kafka.server.KafkaConfig.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
namedefaultdescription
brokeridnoneEach broker is uniquely identified by an id. This id serves as the brokers "name", and allows the broker to be moved to a different host/port without confusing consumers.
enable.zookeepertrueenable zookeeper registration in the server
log.flush.interval500Controls the number of messages accumulated in each topic (partition) before the data is flushed to disk and made available to consumers.
log.default.flush.scheduler.interval.ms3000Controls the interval at which logs are checked to see if they need to be flushed to disk. A background thread will run at a frequency specified by this parameter and will check each log to see if it has exceeded its flush.interval time, and if so it will flush it.
log.default.flush.interval.ms log.default.flush.scheduler.interval.msControls the maximum time that a message in any topic is kept in memory before flushed to disk. The value only makes sense if it's a multiple of log.default.flush.scheduler.interval +.ms
topic.flush.intervals.msnonePer-topic overrides for log.default.flush.interval.ms. Controls the maximum time that a message in selected topics is kept in memory before flushed to disk. The per-topic value only makes sense if it's a multiple of log.default.flush.scheduler.interval.ms. E.g., topic1:1000,topic2:2000
log.retention.hours168Controls how long a log file is retained.
log.roll.hours24 * 7The maximum time before a new log segment is rolled out
topic.log.retention.hoursnoneTopic-specific retention time that overrides log.retention.hours, e.g., topic1:10,topic2:20
log.retention.size-1the maximum size of the log before deleting it. This controls how large a log is allowed to grow
log.cleanup.interval.mins10Controls how often the log cleaner checks logs eligible for deletion. A log file is eligible for deletion if it hasn't been modified for log.retention.hours hours.
log.dirnoneSpecifies the root directory in which all log data is kept.
log.file.size1*1024*1024*1024Controls the maximum size of a single log file.
max.socket.request.bytes104857600the maximum number of bytes in a socket request
monitoring.period.secs600the interval in which to measure performance statistics
num.threadsRuntime.getRuntime().availableProcessorsControls the number of worker threads in the broker to serve requests.
num.partitions1Specifies the default number of partitions per topic.
socket.send.buffer102400the SO_SNDBUFF buffer of the socket sever sockets
socket.receive.buffer102400the SO_RCVBUFF buffer of the socket sever sockets
topic.partition.count.mapnoneOverride parameter to control the number of partitions for selected topics. E.g., topic1:10,topic2:20
zk.connectlocalhost:2182/kafkaSpecifies the zookeeper connection string in the form hostname:port/chroot. Here the chroot is a base directory which is prepended to all path operations (this effectively namespaces all kafka znodes to allow sharing with other applications on the same zookeeper cluster)
zk.connectiontimeout.ms 6000Specifies the max time that the client waits to establish a connection to zookeeper.
zk.sessiontimeout.ms 6000The zookeeper session timeout.
zk.synctime.ms2000Max time for how far a ZK follower can be behind a ZK leader
+ + +

Important configuration properties for the high-level consumer:

+ +

More details about consumer configuration can be found in the scala class kafka.consumer.ConsumerConfig.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertydefaultdescription
groupidgroupidis a string that uniquely identifies a set of consumers within the same consumer group.
socket.timeout.ms30000controls the socket timeout for network requests
socket.buffersize64*1024controls the socket receive buffer for network requests
fetch.size300 * 1024controls the number of bytes of messages to attempt to fetch in one request to the Kafka server
backoff.increment.ms1000This parameter avoids repeatedly polling a broker node which has no new data. We will backoff every time we get an empty set +from the broker for this time period
queuedchunks.max100the high level consumer buffers the messages fetched from the server internally in blocking queues. This parameter controls +the size of those queues
autocommit.enabletrueif set to true, the consumer periodically commits to zookeeper the latest consumed offset of each partition.
autocommit.interval.ms 10000is the frequency that the consumed offsets are committed to zookeeper.
autooffset.resetsmallest
    +
  • smallest: automatically reset the offset to the smallest offset available on the broker.
  • +
  • largest : automatically reset the offset to the largest offset available on the broker.
  • +
  • anything else: throw an exception to the consumer.
  • +
+
consumer.timeout.ms-1By default, this value is -1 and a consumer blocks indefinitely if no new message is available for consumption. By setting the value to a positive integer, a timeout exception is thrown to the consumer if no message is available for consumption after the specified timeout value.
rebalance.retries.max 4max number of retries during rebalance
mirror.topics.whitelist""Whitelist of topics for this mirror's embedded consumer to consume. At most one of whitelist/blacklist may be specified.
mirror.topics.blacklist""Topics to skip mirroring. At most one of whitelist/blacklist may be specified
mirror.consumer.numthreads4The number of threads to be used per topic for the mirroring consumer, by default
+ + +

Important configuration properties for the producer:

+ +

More details about producer configuration can be found in the scala class kafka.producer.ProducerConfig.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
propertydefaultdescription
serializer.classkafka.serializer.DefaultEncoder. This is a no-op encoder. The serialization of data to Message should be handled outside the Producerclass that implements the kafka.serializer.Encoder<T> interface, used to encode data of type T into a Kafka message
partitioner.classkafka.producer.DefaultPartitioner<T> - uses the partitioning strategy hash(key)%num_partitions. If key is null, then it picks a random partition. class that implements the kafka.producer.Partitioner<K>, used to supply a custom partitioning strategy on the message key (of type K) that is specified through the ProducerData<K, T> object in the kafka.producer.Producer<T> send API
producer.typesyncthis parameter specifies whether the messages are sent asynchronously or not. Valid values are -
  • async for asynchronous batching send through kafka.producer.AyncProducer
  • sync for synchronous send through kafka.producer.SyncProducer
broker.listnull. Either this parameter or zk.connect needs to be specified by the user.For bypassing zookeeper based auto partition discovery, use this config to pass in static broker and per-broker partition information. Format-brokerid1:host1:port1, brokerid2:host2:port2. + If you use this option, the partitioner.class will be ignored and each producer request will be routed to a random broker partition.
zk.connectnull. Either this parameter or broker.partition.info needs to be specified by the userFor using the zookeeper based automatic broker discovery, use this config to pass in the zookeeper connection url to the zookeeper cluster where the Kafka brokers are registered.
buffer.size102400the socket buffer size, in bytes
connect.timeout.ms5000the maximum time spent by kafka.producer.SyncProducer trying to connect to the kafka broker. Once it elapses, the producer throws an ERROR and stops.
socket.timeout.ms30000The socket timeout in milliseconds
reconnect.interval 30000the number of produce requests after which kafka.producer.SyncProducer tears down the socket connection to the broker and establishes it again
max.message.size 1000000the maximum number of bytes that the kafka.producer.SyncProducer can send as a single message payload
compression.codec0 (No compression)This parameter allows you to specify the compression codec for all data generated by this producer.
compressed.topicsnullThis 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.
zk.read.num.retries3The producer using the zookeeper software load balancer maintains a ZK cache that gets updated by the zookeeper watcher listeners. During some events like a broker bounce, the producer ZK cache can get into an inconsistent state, for a small time period. In this time period, it could end up picking a broker partition that is unavailable. When this happens, the ZK cache needs to be updated. This parameter specifies the number of times the producer attempts to refresh this ZK cache.
+ Options for Asynchronous Producers (producer.type=async) +
queue.time5000maximum time, in milliseconds, for buffering data on the producer queue. After it elapses, the buffered data in the producer queue is dispatched to the event.handler.
queue.size10000the maximum size of the blocking queue for buffering on the kafka.producer.AsyncProducer
batch.size 200the number of messages batched at the producer, before being dispatched to the event.handler
event.handlerkafka.producer.async.EventHandler<T>the class that implements kafka.producer.async.IEventHandler<T> used to dispatch a batch of produce requests, using an instance of kafka.producer.SyncProducer. +
event.handler.propsnullthe java.util.Properties() object used to initialize the custom event.handler through its init() API
callback.handlernullthe class that implements kafka.producer.async.CallbackHandler<T> used to inject callbacks at various stages of the kafka.producer.AsyncProducer pipeline. +
callback.handler.propsnullthe java.util.Properties() object used to initialize the custom callback.handler through its init() API
+ + +