Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Clients need to shutdown #2389

Closed
saturnism opened this issue May 23, 2020 · 3 comments
Closed

Clients need to shutdown #2389

saturnism opened this issue May 23, 2020 · 3 comments
Labels
pubsub GCP PubSub

Comments

@saturnism
Copy link
Contributor

Describe the bug
For Pub/Sub emulator, sometimes I get:

i.g.i.ManagedChannelOrphanWrapper        : *~*~*~ Channel ManagedChannelImpl{logId=1, target=dns:///localhost:32873} was not shutdown properly!!! ~*~*~*
    Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.

Checking into the code, I'm not sure if we shutdown the clients gracefully, and thus shutdown all the managed channels. Shutdown can be done automatically if our beans implements AutoCloseable, or use @Bean(destroyMethod=...).

@elefeint elefeint added the pubsub GCP PubSub label May 26, 2020
@elefeint
Copy link
Contributor

@ddixit14 See if you can reproduce this issue in the new repo (on version 2.0.4)

@ddixit14
Copy link

Hi, I am not able to reproduce this issue in the new repo. You can probably have a look at this client library issue that may be related: googleapis/google-cloud-java#3648

@elefeint
Copy link
Contributor

I've seen some Spring Integration output related to this, but nothing reproducible. So it's a race condition between spring context shutdown and the client library awaitTermination. Ultimately likely has to get fixed in the client library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pubsub GCP PubSub
Development

No branches or pull requests

3 participants