pubsub async subscriber listener logging error on stop
See original GitHub issueI have the same situation as described in #2485. Using version 0.26.0.
A listener for failed state is logging an error message when stopping an async subscriber:
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@779f4acb rejected from java.util.concurrent.ScheduledThreadPoolExecutor@7fb36e19[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 41]
Although this error is described as harmless in the referenced issue, it pollutes our logs during shutdown and deployments. The only seam I can find is detect if the from
state is STOPPING
, and ignore any failure. But I feel like this would potentially miss real errors if they were to occur during shutdown.
Are there any suggested ways to better handle this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Subscribe with error listener | Cloud Pub/Sub Documentation
Stop receiving messages. Before trying this sample, follow the Node. js setup instructions in the Pub/Sub quickstart using client libraries. For more ...
Read more >Catching Listener Exceptions in long running Cloud PubSub ...
1 Answer 1 ... If the subscriber shutdown successfully because of a call to stopAsync , then awaitTerminated will not throw an exception....
Read more >pubsub - Go Packages
Package pubsub provides an easy way to publish and receive Google Cloud Pub/Sub messages, hiding the details of the underlying server RPCs.
Read more >Things I wish I knew about Google Cloud Pub/Sub: Part 2
Flow control is useful for limiting how many messages your subscribers will pull from Pub/Sub. If your client pulls too many messages at...
Read more >Get realtime updates with Cloud Firestore - Firebase
... for metadata changes; Listen to multiple documents in a collection; View changes between snapshots; Detach a listener; Handle listen errors; What's next....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I found the problem. I’ll put the diagnosis in the PR description.
@pongad Is there a timeframe when this fix will be available?
1.16.0
of gax-java is still not used in a released version of pubsub, unless I’m mistaken. It seems I should not explicitly use a different version of gax-java that is out of step with google-cloud-java either.