The buffer size allocated for a partition. When records are received (which are smaller than this size) KafkaProducer will attempt to optimistically group them together until this size is reached.
Must be at least 0
KafkaProduceris created (to create a RecordAccumulator and an accompanying BufferPool)
KafkaLog4jAppenderis requested to
KafkaProduceris requested to configureTransactionState
ProducerConfigis requested to maybeOverrideEnableIdempotence and idempotenceEnabled
The maximum number of unacknowledged requests the client will send on a single connection before blocking. Note that if this setting is set to be greater than 1 and there are failed sends, there is a risk of message re-ordering due to retries (i.e., if retries are enabled).
Must be at least 1
KafkaProduceris requested to configureInflightRequests
The ID of a KafkaProducer 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.
transactional.id, a producer is limited to idempotent delivery.
Note that, by default, transactions require a cluster of at least three brokers which is the recommended setting for production; for development you can change this, by adjusting broker setting transaction.state.log.replication.factor.
transactional.id is required for the transactional methods.
- KafkaProducer prints out log messages (with the transactional ID included in the log prefix)
KafkaProduceris created (and creates a TransactionManager)
idempotenceEnabled is enabled (
true) when one of the following holds:
Cannot set a transactional.id without also enabling idempotence.
idempotenceEnabled is used when:
KafkaProduceris created (and requested to configureTransactionState, configureInflightRequests, configureAcks)
ProducerConfigis requested to maybeOverrideAcksAndRetries
Map<String, Object> postProcessParsedConfig( Map<String, Object> parsedValues)
postProcessParsedConfig is part of the AbstractConfig abstraction.
maybeOverrideAcksAndRetries overrides client.id configuration property unless already defined.
The new value uses transactional.id (if defined) or the next available ID with the
void maybeOverrideAcksAndRetries( Map<String, Object> configs)
void maybeOverrideEnableIdempotence( Map<String, Object> configs)