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

Restore Emitter callbacks for success and failure #339

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

Older versions of the Java tracker had RequestCallback. Users could provide methods to call when events were successfully sent, or failed to send, via the RequestCallback interface. The onFailure() method could be given a list of Event objects, allowing the user to retrack them as if they were brand new. This was the only way to retry the requests.

Since v0.12.0, the Java tracker automatically retries events indefinitely. As part of the restructuring, RequestCallback was removed.

Callbacks can still be useful, however, so let's reinstate with a better implementation.