void logUnused()
ProducerConfig
ProducerConfig
is the configuration of a Kafka Producer.
ProducerConfig
is created when:
-
…
Name / Default Value / Property | Description |
---|---|
|
The number of acknowledgments a producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent. Default: Property: The following settings are allowed:
|
|
Host:port pairs to use to establish the initial connection to a Kafka cluster. The client will make use of all servers irrespective of which servers are specified here for bootstrapping, i.e. this list only impacts the initial hosts used to discover the full set of servers. Default: (empty) Property: This list should be in the form 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: Property: A Kafka producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition. This helps performance on both the client and the server. No attempt will be made to batch records larger than this size. Requests sent to brokers will contain multiple batches, one for each partition with data available to be sent. A small batch size will make batching less common and may reduce throughput (a batch size of zero will disable batching entirely). A very large batch size may use memory a bit more wastefully as we will always allocate a buffer of the specified batch size in anticipation of additional records. Must be at least |
|
The total bytes of memory a Kafka producer can use to buffer records waiting to be sent to the server. Default: Property: If records are sent faster than they can be delivered to the server the producer will block for MAX_BLOCK_MS_CONFIG after which it will throw an exception. This setting should correspond roughly to the total memory the producer will use, but is not a hard bound since not all memory the producer uses is used for buffering. Some additional memory will be used for compression (if compression is enabled) as well as for maintaining in-flight requests. |
|
|
|
The compression type for all data generated by the producer. The default is Default: Property: Valid values are Compression is of full batches of data, so the efficacy of batching will also impact the compression ratio (more batching means better compression). |
|
|
|
An upper bound on the time to report a success or a failure after a call to Default: Property: A Kafka producer may report failure to send a record earlier than this config if either an unrecoverable error is encountered, the retries have been exhausted, or the record is added to a batch which reached an earlier delivery expiration deadline. The value of this config should be greater than or equal to the sum of request.timeout.ms and linger.ms. Must be at least |
|
When enabled ( Default: Property: When disabled ( Enabling idempotence requires:
If these values are not explicitly set, suitable values will be chosen. If incompatible values are set, a |
|
ProducerInterceptors to use to intercept (and possibly mutate) the records sent out by the producer before they are published to the Kafka cluster. Default: (empty) Property: |
|
Serializer class for keys that implements the org.apache.kafka.common.serialization.Serializer interface. Default: (empty) Property: |
|
The producer groups together any records that arrive in between request transmissions into a single batched request. Normally this occurs only under load when records arrive faster than they can be sent out. However in some circumstances the client may want to reduce the number of requests even under moderate load. This setting accomplishes this by adding a small amount of artificial delay, i.e. rather than immediately sending out a record the producer will wait for up to the given delay to allow other records to be sent so that the sends can be batched together. This can be thought of as analogous to Nagle’s algorithm in TCP. This setting gives the upper bound on the delay for batching: once we get BATCH_SIZE_CONFIG worth of records for a partition it will be sent immediately regardless of this setting, however if we have fewer than this many bytes accumulated for this partition we will 'linger' for the specified time waiting for more records to show up. Default: Property: Must be at least |
|
The maximum number of unacknowledged requests a client will send on a single connection before blocking. Default: Property: Note that if this setting is set to be greater than Must be at least |
|
A value greater than Default: Property: Note that this retry is no different than if the client resent the record upon receiving the error. Allowing retries without setting max.in.flight.requests.per.connection to Note also that produce requests will be failed before the number of retries has been exhausted if the timeout configured by delivery.timeout.ms expires first before successful acknowledgement. Users should generally prefer to leave this config unset and instead use delivery.timeout.ms to control retry behavior. Must be at least |
|
Serializer class for values that implements the org.apache.kafka.common.serialization.Serializer interface. Property: |
|
Default: Property: These methods can be blocked either because the buffer is full or metadata unavailable. Blocking in the user-supplied serializers or partitioner will not be counted against this timeout. Must be at least |
|
The maximum size of a request in bytes. This setting will limit the number of record batches the producer will send in a single request to avoid sending huge requests. This is also effectively a cap on the maximum record batch size. Default: Property: Note that the server has its own cap on record batch size which may be different. Must be at least |
|
|
|
The number of samples maintained to compute metrics (for Kafka producers). Must be at least Property: |
|
|
|
The class names of the MetricsReporters that will be notified of new metric creation. Property: The JmxReporter is always included to register JMX statistics. |
|
The window of time a metrics sample is computed over (for Kafka producers). Property: |
|
The Partitioner to compute the partition for a record when Default: DefaultPartitioner Property: |
|
|
|
|
|
|
|
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: Property: This should be larger than Must be at least |
|
How long to wait (back off) before attempting to retry a failed request to a given topic partition. This avoids repeatedly sending requests in a tight loop under some failure scenarios. Default: Property: Must be at least Used when |
|
|
|
The maximum amount of time (in ms) that the transaction coordinator will wait for a transaction status update from a producer before proactively aborting the ongoing transaction. Property: If this value is larger than transaction.max.timeout.ms configuration (of Kafka brokers), the request will fail with an |
|
User-defined transactional ID to use for transactional delivery. This enables reliability semantics which span multiple producer sessions since it allows the client to guarantee that transactions using the same Transactional ID have been completed prior to starting any new transactions. Default: (empty) Property: With no Transactional ID provided, the producer is limited to idempotent delivery. enable.idempotence must be enabled ( The default means transactions cannot be used. Note that transactions requires a cluster of at least 3 brokers by default what is the recommended setting for production; for development you can change this, by adjusting broker setting |