Class ProducerOptions
java.lang.Object
dev.restate.integration.ProducerOptions
Configuration shared by at-least-once and exactly-once producers.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longKafka-compatible default producer buffer size: 32 MiB.static final DurationKafka-compatible default maximum admission wait: one minute. -
Method Summary
Modifier and TypeMethodDescriptionlongMaximum combined serialized size of accepted invocations retained while they wait to be handed to the transport.static ProducerOptions.Builderbuilder()Starts building producer options.Maximum timesendwaits for admission before refusing an invocation.
-
Field Details
-
DEFAULT_BUFFER_MEMORY
public static final long DEFAULT_BUFFER_MEMORYKafka-compatible default producer buffer size: 32 MiB.- See Also:
-
DEFAULT_MAX_BLOCK_TIME
Kafka-compatible default maximum admission wait: one minute.
-
-
Method Details
-
builder
Starts building producer options.- Returns:
- a new builder
-
bufferMemory
public long bufferMemory()Maximum combined serialized size of accepted invocations retained while they wait to be handed to the transport. A value of zero disables local buffering:sendwaits until the invocation can be handed directly to the transport, andtrySendreports backpressure until that is possible.- Returns:
- the local buffer limit in bytes
-
maxBlockTime
Maximum timesendwaits for admission before refusing an invocation. Admission requires buffer capacity when buffering is enabled, or protocol and transport readiness whenbufferMemory()is zero.- Returns:
- the maximum admission wait
-