K - the type of the key that will be produced. A compatible key serializer must be
provided to serialize the objectsV - the type of the value that will be produced. A compatible value serializer must be
provided to serialize the objectspublic class BaseProducerConfig<K,V>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseProducerConfig.Builder<K,V,T extends BaseProducerConfig.Builder<K,V,T>>
The Builder is used to set the configuration options.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCH_SIZE |
static long |
DEFAULT_LINGER_MS |
static ProxyChain |
DEFAULT_PROXY_CHAIN |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseProducerConfig(BaseProducerConfig.Builder<K,V,?> builder)
Instantiates a new Base producer config.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getBatchSize()
Returns the maximum size in bytes of the batch of messages to produce before sending.
|
DeliveryStrategy |
getDeliveryStrategy()
Returns the delivery strategy the producer should implement.
|
java.lang.Object |
getKeySerializer()
Returns the configured serializer used for key serialization.
|
long |
getLingerMs()
Returns the time to wait after a batch has been created before sending.
|
int |
getMessageBufferSize()
Returns the maximum size of the message buffer used by the worker.
|
int |
getMessageBufferWaitTimeout()
Returns the maximum amount of time in milliseconds to wait for room in the message buffer.
|
OrderingStrategy |
getOrderingStrategy()
Returns the ordering strategy the producer should implement.
|
ProxyChain |
getProxyChain()
Returns the chain of producer proxies this producer uses.
|
java.lang.Object |
getValueSerializer()
Returns the configured serializer used for value serialization.
|
boolean |
isBlocking()
This indicates if the produce call is blocked when the messageBuffer is full
|
public static final ProxyChain DEFAULT_PROXY_CHAIN
public static final long DEFAULT_LINGER_MS
public static final int DEFAULT_BATCH_SIZE
protected BaseProducerConfig(BaseProducerConfig.Builder<K,V,?> builder)
builder - the builder containing the configuration valuespublic DeliveryStrategy getDeliveryStrategy()
DeliveryStrategy for
the available strategies.public OrderingStrategy getOrderingStrategy()
OrderingStrategy for
the available strategies.public boolean isBlocking()
public int getMessageBufferSize()
public int getMessageBufferWaitTimeout()
public java.lang.Object getKeySerializer()
Serializerpublic java.lang.Object getValueSerializer()
Serializerpublic java.lang.Integer getBatchSize()
getLingerMs() also plays a role in the batching of
messagespublic long getLingerMs()
getBatchSize() also plays a role in the batching of messagespublic ProxyChain getProxyChain()
Copyright © 2020–2021 Axual B.V.. All rights reserved.