snowplow-incubator / common-streams

Other
1 stars 0 forks source link

Fix pubsub subscriber thread pools to avoid blocking ack extensions #35

Closed istreeter closed 10 months ago

istreeter commented 10 months ago

Previously, we were using the MoreExecutors.directExecutor to execute Subscriber callbacks. It was a trick we invented so that we could safely turn off FlowControl without PubSub sending us too many events and causing us to run out of memory.

But, because we block the thread on those callbacks, it meant the Subscriber was not able to do admin tasks like acking and managing ack lease time.

We can continue to block the subscriber, but we need to make sure the subscriber still has a thread available for the admin tasks.

istreeter commented 10 months ago

Closing this. It is not needed. What I wrote above is wrong and based on a misunderstanding.