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
24 stars 36 forks source link

Choose HTTP response codes not to retry (close #316) #317

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

For issue #316.

A simple implementation to allow users to choose not to retry when certain HTTP response codes are received. The events are dropped instead.

mscwilson commented 2 years ago

Looking forward to hearing what you come up with @matus-tomlein.

I consider this PR as a temporary fix to make the new retry mechanism slightly more sophisticated. I hope that Java tracker 0.13.0 would implement something better.

mscwilson commented 2 years ago

There's now no delay/backoff after a fatal response code, as it's not an error. It's not logged either (except at DEBUG level like for a successful send with 200 code). The Emitter just keeps sending requests.