googleapis / java-pubsub

Apache License 2.0
123 stars 88 forks source link

GCP Pub/Sub Publisher Issue: ManagedChannel Not Shut Down Properly #2045

Open ankurg03 opened 1 month ago

ankurg03 commented 1 month ago

We are using Debezium version 2.5 to capture SQL CDC (Change Data Capture) events, which are then published to Google Cloud Pub/Sub. This uses the PubSubChangeConsumer for this purpose. However, we encountered an issue where a timeout occurred during the publish event, leading to an instruction to shut down the Debezium process.

The shutdown call got stuck because of an infinite wait on the wait() method inside the waitComplete method of Waiter class.

Implementing a time-bounded wait call may resolve this issue.

Please find the thread dump of a waiting thread.

java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(java.base@11.0.16/Native Method)