Allow to set max retries.