snowplow / snowplow-java-tracker

Snowplow event tracker for Java. Add analytics to your Java desktop and server apps, servlets and games. (See also: snowplow-android-tracker)
http://snowplowanalytics.com
Apache License 2.0
23 stars 36 forks source link

Add a maximum wait time and jitter to event sending retry (close #338) #345

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

For issue #338.

When requests are rejected by the collector, the events are returned to storage. A wait time is added before further attempts are made. The delay increases exponentially with every subsequent rejection. However, there was no maximum time.

This wait time now starts at 100ms, and exponentially increases up to 10 min. I also added randomness to avoid the collector being overwhelmed when it starts accepting requests again.