Class RestateComponentsProperties
Top-level fields (e.g. restate.inactivity-timeout) act as defaults applied to all
services. Per-service configuration in getComponents() takes precedence over these
defaults.
Example configuration in application.properties:
# Default configuration applied to all services
restate.executor=myGlobalExecutor
restate.inactivity-timeout=10m
restate.retry-policy.max-attempts=5
# Per-service configuration (overrides defaults)
restate.components.MyService.executor=myServiceExecutor
restate.components.MyService.inactivity-timeout=5m
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 TypeMethodDescription@Nullable DurationDefault abort timeout for all services.Per-component configuration, keyed by component/service name.@Nullable StringDefault documentation for all services, as shown in the UI, Admin REST API, and the generated OpenAPI documentation.@Nullable BooleanDefault lazy-state setting for all services.@Nullable StringName of theExecutorbean to use for running handlers of all services.@Nullable DurationDefault idempotency retention for all services.@Nullable DurationDefault inactivity timeout for all services.@Nullable BooleanDefault ingress-private setting for all services.@Nullable DurationDefault journal retention for all services.Default metadata for all services, as propagated in the Admin REST API.@Nullable RetryPolicyPropertiesDefault retry policy for all services.@Nullable DurationDefault workflow retention for all workflow services.voidsetAbortTimeout(@Nullable Duration abortTimeout) Default abort timeout for all services.voidsetComponents(Map<String, RestateComponentProperties> components) Per-component configuration, keyed by component/service name.voidsetDocumentation(@Nullable String documentation) Default documentation for all services, as shown in the UI, Admin REST API, and the generated OpenAPI documentation.voidsetEnableLazyState(@Nullable Boolean enableLazyState) Default lazy-state setting for all services.voidsetExecutor(@Nullable String executor) Name of theExecutorbean to use for running handlers of all services.voidsetIdempotencyRetention(@Nullable Duration idempotencyRetention) Default idempotency retention for all services.voidsetInactivityTimeout(@Nullable Duration inactivityTimeout) Default inactivity timeout for all services.voidsetIngressPrivate(@Nullable Boolean ingressPrivate) Default ingress-private setting for all services.voidsetJournalRetention(@Nullable Duration journalRetention) Default journal retention for all services.voidsetMetadata(@Nullable Map<String, String> metadata) Default metadata for all services, as propagated in the Admin REST API.voidsetRetryPolicy(@Nullable RetryPolicyProperties retryPolicy) Default retry policy for all services.voidsetWorkflowRetention(@Nullable Duration workflowRetention) Default workflow retention for all workflow services.
-
Constructor Details
-
RestateComponentsProperties
public RestateComponentsProperties()
-
-
Method Details
-
getExecutor
Name of theExecutorbean to use for running handlers of all services. 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. 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. -
getDocumentation
Default documentation for all services, as shown in the UI, Admin REST API, and the generated OpenAPI documentation. Can be overridden per-service ingetComponents(). -
setDocumentation
Default documentation for all services, as shown in the UI, Admin REST API, and the generated OpenAPI documentation. Can be overridden per-service ingetComponents(). -
getMetadata
Default metadata for all services, as propagated in the Admin REST API. Can be overridden per-service ingetComponents(). -
setMetadata
Default metadata for all services, as propagated in the Admin REST API. Can be overridden per-service ingetComponents(). -
getInactivityTimeout
Default inactivity timeout for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setInactivityTimeout
Default inactivity timeout for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getAbortTimeout
Default abort timeout for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setAbortTimeout
Default abort timeout for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getIdempotencyRetention
Default idempotency retention for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setIdempotencyRetention
Default idempotency retention for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getWorkflowRetention
Default workflow retention for all workflow services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setWorkflowRetention
Default workflow retention for all workflow services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getJournalRetention
Default journal retention for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setJournalRetention
Default journal retention for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getIngressPrivate
Default ingress-private setting for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setIngressPrivate
Default ingress-private setting for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getEnableLazyState
Default lazy-state setting for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
- See Also:
-
setEnableLazyState
Default lazy-state setting for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.4, otherwise service discovery will fail.
-
getRetryPolicy
Default retry policy for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.5, otherwise service discovery will fail.
- See Also:
-
setRetryPolicy
Default retry policy for all services. Can be overridden per-service ingetComponents().NOTE: You can set this field only if you register services against restate-server >= 1.5, otherwise service discovery will fail.
-
getComponents
Per-component configuration, keyed by component/service name. Overrides any top-level defaults.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. Overrides any top-level defaults.Example configuration in
application.properties:restate.components.MyService.inactivity-timeout=10m restate.components.MyService.handlers.myHandler.ingress-private=true
-