question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pubsub async subscriber listener logging error on stop

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pongadcommented, Nov 22, 2017

I found the problem. I’ll put the diagnosis in the PR description.

0reactions
rcoy-vcommented, Jan 12, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found