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
Today I was debugging very high thread usage of one of my applications.
In the thread dump I noticed a lot of threads called "Subscriber-SE-<x>-<y>".
These threads are created by "com.google.cloud.pubsub.v1.Subscriber" in the build() method.
It seems that if the systemExecutorProvider is not set in the subscriber, a new ScheduledExecutorService will be created with a minimum of 6 threads (or more based on parallelPullCount). This is done for every subscriber.
In my case these threads where mostly waiting and not doing anything.
It is possible to add a new configuration property in gcp.pubsub.subscriber.* namespace (for example gcp.pubsub.subscriber.*.system-executor) that will allow configuration of a shared system executor?
The text was updated successfully, but these errors were encountered:
krjura
changed the title
allow custom systemExecutorProvider to be specified via configuration for subscribers
Allow custom systemExecutorProvider to be specified via configuration for subscribers
Sep 8, 2022
Feature description
Today I was debugging very high thread usage of one of my applications.
In the thread dump I noticed a lot of threads called "
Subscriber-SE-<x>-<y>
".These threads are created by "
com.google.cloud.pubsub.v1.Subscriber
" in the build() method.It seems that if the
systemExecutorProvider
is not set in the subscriber, a newScheduledExecutorService
will be created with a minimum of 6 threads (or more based onparallelPullCount
). This is done for every subscriber.In my case these threads where mostly waiting and not doing anything.
Looking at https://github.com/micronaut-projects/micronaut-gcp/blob/master/gcp-pubsub/src/main/java/io/micronaut/gcp/pubsub/bind/DefaultSubscriberFactory.java#L78 micronaut is setting
ExecutorProvider
but not theSystemExecutorProvider
.It is possible to add a new configuration property in
gcp.pubsub.subscriber.*
namespace (for examplegcp.pubsub.subscriber.*.system-executor
) that will allow configuration of a shared system executor?The text was updated successfully, but these errors were encountered: