Package dev.restate.sdk.springboot
Class RestateComponentsProperties
java.lang.Object
dev.restate.sdk.springboot.RestateComponentsProperties
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPer-component configuration, keyed by component/service name.@Nullable StringName of theExecutorbean to use for running handlers of all services.voidsetComponents(Map<String, RestateComponentProperties> components) Per-component configuration, keyed by component/service name.voidsetExecutor(@Nullable String executor) Name of theExecutorbean to use for running handlers of all services.
-
Constructor Details
-
RestateComponentsProperties
public RestateComponentsProperties()
-
-
Method Details
-
getExecutor
Name of theExecutorbean to use for running handlers of all services. This is the global default and can be overridden per-service ingetComponents().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. SeeHandlerRunner.Options.withExecutor()for more details. -
setExecutor
Name of theExecutorbean to use for running handlers of all services. This is the global default and can be overridden per-service ingetComponents().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. SeeHandlerRunner.Options.withExecutor()for more details. -
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
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
-