Add Spring Boot auto-configuration for standalone ActivityClient
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java, spring-boot
- 领域
- backend
调研方向
The issue names no files. Start from the existing WorkflowClient and ScheduleClient auto-configuration in the Spring Boot integration and copy its bean naming, @Primary handling, and backoff conditions for ActivityClient. Done means a root ActivityClient injects without a qualifier, non-root clients resolve by alias, and tests cover customizers and application-provided clients.
由索引模型根据 Issue 内容生成。
描述
What would you like added?
The Java SDK provides ActivityClient for starting and managing standalone activity executions, but the Temporal Spring Boot integration does not currently auto-configure it.
Please add ActivityClient support alongside the existing WorkflowClient and ScheduleClient support, including root and non-root namespaces.
Why is this needed?
Currently, applications must declare their own ActivityClient beans and manually apply namespace, data converter, and interceptor configuration.
Auto-configuration would make standalone activities easier to use from controllers and other Spring-managed components, while keeping client configuration consistent with the rest of the Temporal integration.
Proposed behavior
1. Register a client for each configured namespace.
Follow the existing client bean naming conventions:
- Root namespace:
temporalActivityClient, marked@Primary. - Non-root namespace:
<namespace-alias>ActivityClient, falling back to the namespace name when no alias is configured.
For example:
spring:
temporal:
namespace: apps
namespaces:
- namespace: partner
alias: partner
Applications could then inject the root client:
public AppsController(ActivityClient activityClient) {
this.activityClient = activityClient;
}
Or select a non-root client:
public PartnerController(
@Qualifier("partnerActivityClient") ActivityClient activityClient) {
this.activityClient = activityClient;
}
2. Apply namespace-specific configuration.
Each client should use the appropriate:
WorkflowServiceStubsand connection configuration.- Namespace.
- Data converter.
- Activity client interceptors.
Provide an options customization hook consistent with the existing integration:
@Bean
public TemporalOptionsCustomizer<ActivityClientOptions.Builder>
activityClientCustomizer() {
return builder -> builder.setIdentity("my-application");
}
Support namespace-specific customizers using the existing non-root customization conventions.
3. Keep operation options at the invocation level.
StartActivityOptions, including task queue and timeouts, should remain arguments to activity invocations rather than become part of the auto-configured client.
4. Support application-provided clients.
Follow the integration’s bean override/backoff conventions so applications can supply their own client without conflicting with auto-configuration.
Acceptance criteria
- Root
ActivityClientcan be injected without a qualifier. - Non-root clients can be selected by namespace/alias qualifier.
- Namespace-specific connections, converters, interceptors, and options customizers are applied correctly.
- Tests cover root and multiple non-root namespaces, customization, and application-provided clients.
- Documentation includes configuration, injection, and a standalone activity invocation example.
Breaking changes?
None intended. This adds Spring-managed clients for an existing SDK API.
Server PR
No additional server changes are expected for the Spring integration itself.
- 主要语言
- Java
- 星标
- 437
- 派生
- 261
- 平均合并
- 6 天 10 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-java 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
temporalio/sdk-java#1825 ·
维护者通常 2 天内回复
-
Proposal: handle SIGTERM by default to initiate graceful worker shutdown可能已有人在做 @eamsden 于 9 天前认领。 未关闭
temporalio/sdk-java#3135 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Skip result deserialization for local activities and SideEffect when not replaying (mutableSideEffect already does this)可能已有人在做 @Quinn-With-Two-Ns 于 4 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 54/100
temporalio/sdk-java#3125 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Skip input serialization for local activities when doNotIncludeArgumentsIntoMarker is set可能已有人在做 @Quinn-With-Two-Ns 于 4 天前认领。 未关闭enhancement
难度 3/5 1-2 天 新手友好度 55/100
temporalio/sdk-java#3124 · 已指派 1 人 ·
维护者通常 2 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
temporalio/sdk-java#3122 ·
维护者通常 2 天内回复
查看 temporalio/sdk-java 的全部 Issue
相似的 Issue
-
BC remittance upload: a claim MSP refused (S03) is saved with a blank status instead of refused (F)未关闭type: bug
难度 2/5 1-3 小时 新手友好度 88/100
carlos-emr/carlos#4933 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
apache/rocketmq-dashboard#6925 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Vakore/ZappierGames#147 ·
-
spigotmc
难度 1/5 1 小时以内 新手友好度 92/100
Dans-Plugins/Wild-Pets#356 ·
维护者通常 1 天内回复
-
spigotmc
难度 1/5 1 小时以内 新手友好度 85/100
Dans-Plugins/Medieval-Roleplay-Engine#371 ·
维护者通常 1 天内回复