Class ProducerOptions

java.lang.Object
dev.restate.integration.ProducerOptions

@Experimental public final class ProducerOptions extends Object
Configuration shared by at-least-once and exactly-once producers.
  • Field Details

    • DEFAULT_BUFFER_MEMORY

      public static final long DEFAULT_BUFFER_MEMORY
      Kafka-compatible default producer buffer size: 32 MiB.
      See Also:
    • DEFAULT_MAX_BLOCK_TIME

      public static final Duration DEFAULT_MAX_BLOCK_TIME
      Kafka-compatible default maximum admission wait: one minute.
  • Method Details

    • builder

      public static ProducerOptions.Builder 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: send waits until the invocation can be handed directly to the transport, and trySend reports backpressure until that is possible.
      Returns:
      the local buffer limit in bytes
    • maxBlockTime

      public Duration maxBlockTime()
      Maximum time send waits for admission before refusing an invocation. Admission requires buffer capacity when buffering is enabled, or protocol and transport readiness when bufferMemory() is zero.
      Returns:
      the maximum admission wait