Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up| ★ wanayoo — archive 1999 https://github.com/segmentio/analytics-java/pull/162 | Nouvelle recherche | Portail wanayoo |
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
This PR allows for users to set a
queueSizefor theAnalyticsClientsuch that the maximum number of in messages buffered in memory / inflight is equal toqueueSize + flushQueueSize.Linked issue: #161
The compromise made here is that the default
networkExecutorno longer queues message batches indefinitely, but rather blocks thelooperExecutoruntil it has finished sending the previous message. Given that the default implementation is already blocking and single threaded, this does not feel like much of a regression.The only issue I can see here is that it would be a bit confusing to anyone providing their own multi-threaded
networkExecutorwho did not realise that they must use aSynchronousQueuein order for thequeueSizesetting to work correctly.