flowable / flowable/flowable-engine

Why HttpClientConfig#requestRetryLimit is ignored in HttpActivityBehaviorImpl

Aperta
#2,128 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

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 ?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.