change from Integer to int, enable long running connection tries with maxRetries = -1