SimpleRetryPolicy: Call getMaxAttempts() instead
This is done to support maxAttempts to be configurable at Tenant level in a Multi Tenant Application. In this case, one can simple override getMaxAttempts and return appropriate value based on Context Tenant.
This commit is contained in:
@@ -167,7 +167,7 @@ public class SimpleRetryPolicy implements RetryPolicy {
|
||||
@Override
|
||||
public boolean canRetry(RetryContext context) {
|
||||
Throwable t = context.getLastThrowable();
|
||||
return (t == null || retryForException(t)) && context.getRetryCount() < this.maxAttempts;
|
||||
return (t == null || retryForException(t)) && context.getRetryCount() < getMaxAttempts();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user