Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix backoff logic in ResilientStream
The backoff is now truly exponential (Math.pow(count, 2)) because the sleep is done before the next recursive call to loop instead of inside it. This way the message "Restarting in x seconds" actually becomes true. Previously the backoff was somewhat similar to a Fibonacci sequence because the restarted program contained the previous iteration's sleep time plus the current one. Also removes the ??? in favor of logging the Exception messages and rethrowing for improved observability. (the logging backend gets a chance to e.g. format the log for proper ingestion into services such as DataDog)
- Loading branch information