| Package | Description |
|---|---|
| net.soundvibe.kafka.config.producer |
| Modifier and Type | Method and Description |
|---|---|
static ProducerConfigBuilder |
ProducerConfigBuilder.create() |
ProducerConfigBuilder |
ProducerConfigBuilder.withAcks(Acks acks)
The number of acknowledgments the producer requires the leader to have received before considering a request complete.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withBatchSize(int batchSize)
The producer will attempt to batch records together into fewer requests whenever multiple records are being sent
to the same partition.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withBufferMemory(long bufferMemory)
The total bytes of memory the producer can use to buffer records waiting to be sent to the server.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withCompressionType(org.apache.kafka.common.record.CompressionType compressionType)
The compression type for all data generated by the producer.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withDeliveryTimeout(Duration deliveryTimeout)
An upper bound on the time to report success or failure
after a call to
send() returns. |
ProducerConfigBuilder |
ProducerConfigBuilder.withEnableIdempotence(boolean enableIdempotence)
When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withInterceptorClasses(Class<? extends org.apache.kafka.clients.producer.ProducerInterceptor>... interceptorClasses)
A list of classes to use as interceptors.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withKeySerializer(Class<? extends org.apache.kafka.common.serialization.Serializer> keySerializer)
Serializer class for key that implements the
org.apache.kafka.common.serialization.Serializer interface. |
ProducerConfigBuilder |
ProducerConfigBuilder.withLinger(Duration linger)
The producer groups together any records that arrive in between request transmissions into a single batched request.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withMaxBlock(Duration maxBlock)
The configuration controls how long the
KafkaProducer's send(), partitionsFor(), "
initTransactions(), sendOffsetsToTransaction(), commitTransaction() "
and abortTransaction() methods will block. |
ProducerConfigBuilder |
ProducerConfigBuilder.withMaxInFlightRequestsPerConnection(int maxInFlightRequestsPerConnection)
The maximum number of unacknowledged requests the client will send on a single connection before blocking.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withMaxRequestSize(int maxRequestSize)
The maximum size of a request in bytes.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withPartitioner(Class<? extends org.apache.kafka.clients.producer.Partitioner> partitioner)
Partitioner class that implements the
org.apache.kafka.clients.producer.Partitioner interface. |
ProducerConfigBuilder |
ProducerConfigBuilder.withRequestTimeout(Duration requestTimeout)
This should be larger than
replica.lag.time.max.ms (a broker configuration)
to reduce the possibility of message duplication due to unnecessary producer retries. |
ProducerConfigBuilder |
ProducerConfigBuilder.withRetries(int retries)
Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withTransactionalId(String transactionalId)
The TransactionalId to use for transactional delivery.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withTransactionTimeout(Duration transactionTimeout)
The maximum amount of time in ms that the transaction coordinator will wait for a transaction status update from the producer before proactively aborting the ongoing transaction.
|
ProducerConfigBuilder |
ProducerConfigBuilder.withValueSerializer(Class<? extends org.apache.kafka.common.serialization.Serializer> valueSerializer)
Serializer class for value that implements the
org.apache.kafka.common.serialization.Serializer interface. |
Copyright © 2021. All rights reserved.