You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
com.google.api.gax.bundling.ThresholdBundler has an unbounded queue for closedBundles that will fill endlessly if an application is publishing faster than the queue can be drained, or if draining/publishing can't occur at all for some reason. We've seen on a few instances (3-5 applications out of 1000s) that this eventually leads to a OutOfMemoryError as the heap space fills up.
It seems like if the thread that ThresholdBundlingForwarder starts dies for any reason, it won't be restarted, and the messages accumulating in the Bundler will not be processed at all (eventually leading to the OOM above).
I am only familiar with the bundling behavior as it is used in google-cloud-pubsub, but for the first issue I think it may make sense for the Bundler to allow for specifying a maximum number of bundles/items that it will hold onto, and then either reject new items from being added or drop the oldest bundles/items when this limit is hit.