Class WorkerOptions

java.lang.Object
io.superdurable.dex.WorkerOptions

public final class WorkerOptions extends Object
Configures a Java Worker's outbound polling, connection, and serialization.

The Worker connects to localhost:8801 by default and receives tasks over outbound streams. It needs only an outbound connection to the Dex Server. Pull settings use PullWorkerOptions defaults unless explicitly configured. The default Jackson mapper discovers installed modules.

WorkerOptions options = WorkerOptions.newBuilder()
        .serverAddress("dex:8801")
        .objectMapper(applicationObjectMapper)
        .grpcErrorStatusMapping(GrpcErrorStatusMapping.newBuilder()
                .map(PaymentDeclinedException.class, Status.Code.FAILED_PRECONDITION)
                .build())
        .build();
  • Method Details

    • newBuilder

      public static WorkerOptions.Builder newBuilder()
      Creates a builder initialized with local development defaults.
      Returns:
      a new mutable builder