configuration.md

April 15, 2026 ยท View on GitHub

Configuration

Customize SDK behavior by overriding createConfiguration() in your handler:

public class OrderProcessor extends DurableHandler<Order, OrderResult> {

    @Override
    protected DurableConfig createConfiguration() {
        // Custom Lambda client with connection pooling
        var lambdaClientBuilder = LambdaClient.builder()
            .httpClient(ApacheHttpClient.builder()
                .maxConnections(50)
                .connectionTimeout(Duration.ofSeconds(30))
                .build());

        return DurableConfig.builder()
            .withLambdaClientBuilder(lambdaClientBuilder)
            .withSerDes(new MyCustomSerDes())           // Custom serialization
            .withExecutorService(Executors.newFixedThreadPool(10))  // Custom thread pool
            .withLoggerConfig(LoggerConfig.withReplayLogging())     // Enable replay logs
            .build();
    }

    @Override
    protected OrderResult handleRequest(Order order, DurableContext ctx) {
        // Your handler logic
    }
}
OptionDescriptionDefault
withLambdaClientBuilder()Custom AWS Lambda clientAuto-configured Lambda client
withSerDes()Serializer for step resultsJackson with default settings
withExecutorService()Thread pool for user-defined operationsCached daemon thread pool
withLoggerConfig()Logger behavior configurationSuppress logs during replay
withPollingStrategy()Backend polling strategyExponential backoff: 1s base, 2x rate, FULL jitter, 10s max
withCheckpointDelay()How often the SDK checkpoints updatesDuration.ofSeconds(0) (as soon as possible)

The withExecutorService() option configures the thread pool used for running user-defined operations. Internal SDK coordination (checkpoint batching, polling) runs on an SDK-managed thread pool.