I have a java code initiate a PubsubSubscriber with an executor Provider. It works for like 16 hr of idling. However, about 1 day of idling it stopped receive message from the subscription. If I restart the program it will go back to work again. I read from the documentation https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/pubsub/v1/package-summary.html That to keep the subscriber running forever, need a executor provider. I initiated with one
ExecutorProvider executorProvider = FixedExecutorProvider.create(myScheduledExecutorService);
this.subscriber = Subscriber
.newBuilder(subscriptionName, this)
.setExecutorProvider(executorProvider)
.setCredentialsProvider(myCredentialsProvider)
.build();
The executorProvider above is created by
Is there something else need to be set up to make sure the subscriber keep receiving the messages?