temporalio / temporalio/sdk-java

Declaring ActivityStub using annotation instead of newActivityStub

Open
#1,531 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
433
Forks
249
Avg merge
5d 6h
Merged PRs (30d)
26

Description

temporal-sdk: 1.17.0
temporal-spring-boot-starter-alpha: 1.17.0

When using Temporal-Springboot-alpha since the workers are created by Temporal-Springboot-alpha
Can we declare ActivityStub using an annotation?
Something like

@ActivityStub(
taskQueue = SOME_QUEUE,
retryOptions =
@RetryActivityOptions(
maximumAttempts = 1,
doNotRetry = {"SomeException"}))
private ISomeActivity someActivity;

Instead of defining it as "Workflow.newActivityStub(ISomeActivity.class, activityOptions)"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Temporal-Springboot-alpha worker creation behavior and the existing Workflow.newActivityStub(ISomeActivity.class, activityOptions) usage described in the issue. Compare that with the proposed @ActivityStub and @RetryActivityOptions declarations, then determine the annotation processing or runtime integration needed and define tests showing that taskQueue and retry options are applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.