Added configuration control for max-retries