configurable maxAttempts

allow to configure the number of attempts through Remote options.