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

Reduce the default maximum event buffer capacity #352

Closed mscwilson closed 2 years ago

mscwilson commented 2 years ago

Events are buffered until there are enough for a whole batch, or until a thread is free to send them. If the event collector goes down, they will remain in the buffer until requests start getting through again.

Currently, with default configuration, the tracker will attempt to buffer/store up to Integer.MAX_VALUE events. It's the default size of the queue (LinkedBlockingDeque) used. This capacity is too big - we assume the app would crash before buffering so many events.

Let's set a more conservative default buffer capacity.