flowable / flowable/flowable-engine

Why HttpClientConfig#requestRetryLimit is ignored in HttpActivityBehaviorImpl

Abierto
#2,128 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
9.5k
Forks
2.9k
Merge medio
7 h 8 min
PR fusionados (30 d)
2

Descripción

One can configure requestRetryLimit as described on [flowable dosc http task](https://flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs/#http-task)

This seems to be ignored as the code goes

[code](https://github.com/flowable/flowable-engine/blob/e8ac963958d9b31809741d6caa22b6e3ede50838/modules/flowable-http/src/main/java/org/flowable/http/bpmn/impl/HttpActivityBehaviorImpl.java#L138)

```
if (config.getRequestRetryLimit() > 0) {
retryCount = config.getRequestRetryLimit();
}
httpClientBuilder.setRetryHandler(new DefaultHttpRequestRetryHandler(retryCount, false));
```

Which then leads to ignoring retry feature (within retry handler)

```
@Override
public boolean retryRequest(
final IOException exception,
final int executionCount,
final HttpContext context) {
..

if (!clientContext.isRequestSent() || this.requestSentRetryEnabled) {
// Retry if the request has not been sent fully or
// if it's OK to retry methods that have been sent
return true;
}
// otherwise do not retry
return false;
}
```

I'd expect this feature to be included in retryhandler, i.e.

```

if (config.getRequestRetryLimit() > 0) {
retryCount = config.getRequestRetryLimit();
httpClientBuilder.setRetryHandler(new DefaultHttpRequestRetryHandler(retryCount, true));
}
```

or am I missing something ?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start in modules/flowable-http/src/main/java/org/flowable/http/bpmn/impl/HttpActivityBehaviorImpl.java around line 138 and trace how requestRetryLimit is passed to DefaultHttpRequestRetryHandler. Verify the configured limit affects retries for sent requests, and add or update coverage in the flowable-http test area so the intended retry behavior is demonstrably complete.

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

Evaluación

Stack tecnológico
java
Área
api, backend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.