Skip to content

Conversation

salaboy
Copy link
Collaborator

@salaboy salaboy commented Sep 8, 2025

Issue describing the changes in this PR

based on: dapr/durabletask-go@2fcc964

resolves dapr/java-sdk#1532

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

@salaboy
Copy link
Collaborator Author

salaboy commented Sep 8, 2025

@javier-aliaga, we need to validate that this creates timers with the same names as the Go SDK. We also need to validate this against Catalyst, my current approach is to use a modified version in the Java SDK and then run examples to validate the same output.

@salaboy salaboy marked this pull request as draft September 8, 2025 08:00
.setId(id)
.setCreateTimer(CreateTimerAction.newBuilder().setFireAt(ts))
.setCreateTimer(CreateTimerAction.newBuilder()
.setName(name + "-timer-" + id).setFireAt(ts))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't build a name here, just use whatever is provided

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@famarting I need to add the id here to the name, right? So all the instances of the timer have different name, that include the ID

.setId(id)
.setCreateTimer(CreateTimerAction.newBuilder().setFireAt(ts))
.setCreateTimer(CreateTimerAction.newBuilder()
.setName(name + "-" + id).setFireAt(ts))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should add the id here, the name is the name, and whatever is provided should be respected

if (!delay.isZero() && !delay.isNegative()) {
// Use a durable timer to create the delay between retries
this.context.createTimer(delay).await();
this.context.createTimer(getName() + "-retry",delay).await();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case I think this is good, its a made up name, but that it shows that it comes from the activity but is a retry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Timers name, including retries and waitForEvents

2 participants