flowable / flowable/flowable-engine
Why HttpClientConfig#requestRetryLimit is ignored in HttpActivityBehaviorImpl
- Vorherrschende Sprache
- Java
- Sterne
- 9.5k
- Forks
- 2.9k
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
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 ?
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100