Springboot NexusClient and NexusServiceClient<T> support for easier, correct SANO usage
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java, spring-boot
- 领域
- backend
调研方向
Start with the Spring Boot autoconfiguration and multiple-namespace support referenced in the issue, then trace how workflow clients are configured and exposed as beans. Determine how NexusClient and NexusServiceClient<T> should fit that configuration, including non-root namespaces; done means the requested client types can be injected with the described aliases and service configuration.
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
Guidance in javadoc for NexusClient is Client for managing standalone Nexus operation executions. Obtain an instance via newInstance(WorkflowServiceStubs) or newInstance(WorkflowServiceStubs, NexusClientOptions). Do not create this object per request; share it for the lifetime of the process.
[here])https://www.javadoc.io/doc/io.temporal/temporal-sdk/latest/io/temporal/client/NexusClient.html).
Describe the solution you'd like
First improvement
Lifestyle correctness guidance like that should be made simpler with Spring so I can nexusClient in my controller just like I can workflowClient.
We should support this across all namespaces though using the nice "non-root" namespace config support. It is Nexus, after all, so let me call across Namespaces :) .
spring.temporal:
namespaces:
# I have a couple services inside my `apps` Namespace I want to use
- namespace: apps
alias: apps
nexus-service-clients:
- alias: apps-v1
endpoint: oms-apps-v1
service: com.acme.oms.services.AppsService
- alias: support-v1
endpoint: oms-support-v1
service: com.acme.oms.services.SupportService
// my REST Controller
// Use @Qualifier since non-root referencing alias
public AppsController(@Qualifier("apps-v1NexusClient") NexusClient appsNexusClient) {
this.appsNC = appsNexusClient;
}
Customization for options (interceptors,dataconverter, etc) can follow the existing path for doing such things with workflow client...ideally we could do this in configuration directly but the requirement to code those a shortcoming that already exists in our SB integration so not necessarily part of this.
Second improvement
We can do better than this though I think and support a nexus-service-clients per client so I can do something like :
spring.temporal:
namespaces:
# I have a couple services inside my `apps` Namespace I want to use
- namespace: apps
alias: apps
nexus-service-clients:
- alias: apps-v1
endpoint: oms-apps-v1
service: com.acme.oms.services.AppsService
- alias: support-v1
endpoint: oms-support-v1
service: com.acme.oms.services.SupportService
// my REST Controller
// No @Qualifier needed but I could do it with `alias` I guess
public SupportController(NexusServiceClient<SupportService> supportSvc) {
this.supportSvc = supportSvc;
}
Describe alternatives you've considered
Roll my own @Bean but I want it to be more approachable!
Additional context
SANO is here, let's make it dead simple to integrate All The Things!
- 主要语言
- Java
- 星标
- 433
- 派生
- 257
- 平均合并
- 2 天 22 小时
- 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 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 54/100
temporalio/sdk-java#3125 ·
维护者通常 2 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 55/100
temporalio/sdk-java#3124 ·
维护者通常 2 天内回复
-
难度 5/5 一周以上 新手友好度 38/100
temporalio/sdk-java#3121 ·
维护者通常 2 天内回复
-
Allow a timer summary on Workflow.sleep and Workflow.await with timeout可能已有人在做 @sangkyoonnam 于 5 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 55/100
temporalio/sdk-java#3108 ·
维护者通常 2 天内回复
查看 temporalio/sdk-java 的全部 Issue
相似的 Issue
-
[Bug] Logo style setting missing and `classic` style not applied across multiple platforms (v3.1.0)未关闭
难度 2/5 1-3 小时 新手友好度 75/100
Stirling-Tools/Stirling-PDF#8382 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
维护者通常 4 天内回复
-
enhancement untriaged
难度 2/5 1-3 小时 新手友好度 78/100
opensearch-project/sql#5842 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
openhab/openhab-addons#21882 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
YunaiV/ruoyi-vue-pro#1273 ·
维护者通常 3 天内回复