Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Springboot NexusClient and NexusServiceClient<T> support for easier, correct SANO usage

Đang mở
#3,122 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, spring-boot
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

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;
  }

ref: https://github.com/temporalio/sdk-java/tree/main/temporal-spring-boot-autoconfigure#running-multiple-name-space-experimental

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!

Ngôn ngữ chính
Java
Star
433
Fork
257
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
24

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của temporalio/sdk-java

Tất cả issue của temporalio/sdk-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.