Ability to specify activity timeouts via annotation in Java SDK

Abierto
#2,051 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
32/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java

Línea de trabajo

Empieza por rastrear cómo @ActivityInterface, @ActivityMethod, @MethodRetry, los stubs de activity y WorkflowImplementationOptions definen actualmente el comportamiento de reintento y timeout. Compara la precedencia a nivel de método y de stub, y después define y prueba una API basada en anotaciones que admita timeouts de start-to-close y schedule-to-close sin nombres de activity como cadenas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Is your feature request related to a problem? Please describe.
In the Java SDK, you have an @ActivityInterface with multiple @ActivityMethods. The latter is the actual unit of execution. However, you specify retry and timeout options on the activity stub, which is based on the interface, so in order to have specific config for each activity you have to go out of your way and break up the interface into small pieces, which kinda defeats one of the nicest features of Temporal which is to just program your service as if it were native code. You can configure specific settings per method, but you have to use strings for activity names instead of strongly typed constructs, and still the activity-stub level config takes precedence.

Recently, I became aware of the @MethodRetry annotation, which is great, but it only allows you to specify retry options, not timeouts, so it falls short of addressing the basic issue.

Describe the solution you'd like
Either an additional set of parameters in @MethodRetry or a new annotation (e.g. @ActivityTimeouts) that allows me to specify activity timeouts (start-to-close and schedule-to-close) at the method level.

Describe alternatives you've considered
Specifying per-activity config using WorkflowImplementationOptions, but you have to use strings for activity names instead of strongly typed constructs, and still the activity-stub level config takes precedence.

Additional context
N/A.

Lenguaje dominante
Java
Estrellas
447
Forks
278
Merge medio
3 d 22 h
PR fusionados (30 d)
28

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de temporalio/sdk-java

Todos los issues de temporalio/sdk-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.