flowable / flowable/flowable-engine
Why HttpClientConfig#requestRetryLimit is ignored in HttpActivityBehaviorImpl
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
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 ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.