Class ProducerOptions.Builder

java.lang.Object
dev.restate.integration.ProducerOptions.Builder
Enclosing class:
ProducerOptions

public static final class ProducerOptions.Builder extends Object
Builder for ProducerOptions.
  • Method Details

    • bufferMemory

      public ProducerOptions.Builder bufferMemory(long bytes)
      Sets the maximum combined serialized size of accepted invocations retained while they wait to be handed to the transport. Set this to zero to disable local buffering.
      Parameters:
      bytes - a non-negative byte count
    • maxBlockTime

      public ProducerOptions.Builder maxBlockTime(Duration duration)
      Sets how long send waits for admission. Duration.ZERO makes send fail immediately under backpressure.
    • defaultMetadata

      public ProducerOptions.Builder defaultMetadata(InvocationMetadata metadata)
      Sets invocation fields applied to every record unless overridden by that invocation. The metadata is snapshotted when build() is called.
    • build

      public ProducerOptions build()