Add Spring Boot auto-configuration for standalone ActivityClient
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- java, spring-boot
- Bereich
- backend
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 437
- Forks
- 261
- Ø Merge
- 4 T. 10 Std.
- Gemergte PRs (30 T.)
- 21
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus temporalio/sdk-java
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
temporalio/sdk-java#1825 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
temporalio/sdk-java#3163 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Proposal: handle SIGTERM by default to initiate graceful worker shutdownEvtl. vergeben @eamsden hat das vor 13 Tagen übernommen. Offen
temporalio/sdk-java#3135 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Skip result deserialization for local activities and SideEffect when not replaying (mutableSideEffect already does this)Evtl. vergeben @Quinn-With-Two-Ns hat das vor 8 Tagen übernommen. Offenenhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 54/100
temporalio/sdk-java#3125 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Skip input serialization for local activities when doNotIncludeArgumentsIntoMarker is setEvtl. vergeben @Quinn-With-Two-Ns hat das vor 8 Tagen übernommen. Offenenhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
temporalio/sdk-java#3124 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in temporalio/sdk-java
Ähnliche Issues
-
Optimize consumer version heatmap aggregation to avoid repeated scansEvtl. vergeben @praykaria31 hat das heute übernommen. Offentype/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Apicurio/apicurio-registry#10662 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
a:false-positive
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
status: waiting-for-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
spring-projects/spring-boot#52347 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
opensearch-project/opensearch-migrations#3480 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
enhancement feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
rsp777/service-pulse-app#28 ·