public class SenderOptions<K,V> extends Object
Modifier and Type | Method and Description |
---|---|
Duration |
closeTimeout()
Returns the timeout for graceful shutdown of this sender.
|
SenderOptions<K,V> |
closeTimeout(Duration timeout)
Configures the timeout for graceful shutdown of this sender.
|
static <K,V> SenderOptions<K,V> |
create()
Creates a sender options instance with default properties.
|
static <K,V> SenderOptions<K,V> |
create(Map<String,Object> configProperties)
Creates a sender options instance with the specified config overrides for the underlying
Kafka
Producer . |
static <K,V> SenderOptions<K,V> |
create(Properties configProperties)
Creates a sender options instance with the specified config overrides for the underlying
Kafka
Producer . |
int |
maxInFlight()
Returns the maximum number of in-flight records that are fetched
from the outbound record publisher while acknowledgements are pending.
|
SenderOptions<K,V> |
maxInFlight(int maxInFlight)
Configures the maximum number of in-flight records that are fetched
from the outbound record publisher while acknowledgements are pending.
|
Map<String,Object> |
producerProperties()
Returns the configuration properties for the underlying Kafka
Producer . |
Object |
producerProperty(String name)
Returns the Kafka
Producer configuration property value for the specified option name. |
SenderOptions<K,V> |
producerProperty(String name,
Object value)
Sets Kafka
Producer configuration property to the specified value. |
Scheduler |
scheduler()
Returns the scheduler used for publishing send results.
|
SenderOptions<K,V> |
scheduler(Scheduler scheduler)
Sets the scheduler used for publishing send results.
|
SenderOptions<K,V> |
toImmutable()
Returns a new immutable instance with the configuration properties of this instance.
|
public static <K,V> SenderOptions<K,V> create()
public static <K,V> SenderOptions<K,V> create(Map<String,Object> configProperties)
Producer
.public static <K,V> SenderOptions<K,V> create(Properties configProperties)
Producer
.public Map<String,Object> producerProperties()
Producer
.public Object producerProperty(String name)
Producer
configuration property value for the specified option name.public SenderOptions<K,V> producerProperty(String name, Object value)
Producer
configuration property to the specified value.public Scheduler scheduler()
public SenderOptions<K,V> scheduler(Scheduler scheduler)
public int maxInFlight()
public SenderOptions<K,V> maxInFlight(int maxInFlight)
ProducerConfig.BUFFER_MEMORY_CONFIG
to control memory usage and to avoid blocking the reactive pipeline.public Duration closeTimeout()
public SenderOptions<K,V> closeTimeout(Duration timeout)
public SenderOptions<K,V> toImmutable()