Class RestateComponentsProperties

java.lang.Object
dev.restate.sdk.springboot.RestateComponentsProperties

@ConfigurationProperties(prefix="restate") public class RestateComponentsProperties extends Object
Properties for configuring Restate services.

Example configuration in application.properties:


 # Configuration for a service named "MyService"
 restate.components.MyService.executor=myServiceExecutor
 restate.components.MyService.inactivity-timeout=10m
 restate.components.MyService.abort-timeout=1m
 restate.components.MyService.idempotency-retention=1d
 restate.components.MyService.journal-retention=7d
 restate.components.MyService.ingress-private=false
 restate.components.MyService.enable-lazy-state=true
 restate.components.MyService.documentation=My service description
 restate.components.MyService.metadata.version=1.0
 restate.components.MyService.metadata.team=platform
 restate.components.MyService.retry-policy.initial-interval=100ms
 restate.components.MyService.retry-policy.exponentiation-factor=2.0
 restate.components.MyService.retry-policy.max-interval=10s
 restate.components.MyService.retry-policy.max-attempts=10
 restate.components.MyService.retry-policy.on-max-attempts=PAUSE

 # Per-handler configuration
 restate.components.MyService.handlers.myHandler.inactivity-timeout=5m
 restate.components.MyService.handlers.myHandler.ingress-private=true
 restate.components.MyService.handlers.myHandler.documentation=Handler description
 restate.components.MyService.handlers.myWorkflowHandler.workflow-retention=30d
 
  • Constructor Details

    • RestateComponentsProperties

      public RestateComponentsProperties()
  • Method Details

    • getExecutor

      public @Nullable String getExecutor()
      Name of the Executor bean to use for running handlers of all services. This is the global default and can be overridden per-service in getComponents().

      NOTE: This option is only used for Java services, not Kotlin services.

      If not specified, virtual threads are used for Java >= 21, otherwise Executors.newCachedThreadPool() is used. See HandlerRunner.Options.withExecutor() for more details.

    • setExecutor

      public void setExecutor(@Nullable String executor)
      Name of the Executor bean to use for running handlers of all services. This is the global default and can be overridden per-service in getComponents().

      NOTE: This option is only used for Java services, not Kotlin services.

      If not specified, virtual threads are used for Java >= 21, otherwise Executors.newCachedThreadPool() is used. See HandlerRunner.Options.withExecutor() for more details.

    • getComponents

      public Map<String,RestateComponentProperties> getComponents()
      Per-component configuration, keyed by component/service name.

      Example configuration in application.properties:

       restate.components.MyService.inactivity-timeout=10m
       restate.components.MyService.handlers.myHandler.ingress-private=true
       
    • setComponents

      public void setComponents(Map<String,RestateComponentProperties> components)
      Per-component configuration, keyed by component/service name.

      Example configuration in application.properties:

       restate.components.MyService.inactivity-timeout=10m
       restate.components.MyService.handlers.myHandler.ingress-private=true