snowplow/snowplow-java-tracker

Refactor TrackerEvents for event payload creation

mscwilson opened this issue · 0 comments

The tracker track() method currently creates TrackerEvents; they contain Subject, Prameter and Event objects. These TrackerEvents are used right up until the events are being sent, when they are TrackerPayloads are generated from them.

TrackerEvents were added in PR #226 as part of a larger refactoring. The idea was that for a failed events callback, it would be easy to replay the Event (wrapped in the TrackerEvent) back into the tracker. The event storage is being overhauled for this release (0.12.0), and retry added. It's a good time to change how events and payloads are created.

Refactor TrackerEvents and maybe add a thread/threadpool to the tracker.