Shutdown connection to Temporal

Hi,

I have a Java application that is running the Worker code. The code runs fine, and runs the worker and executes the workflow. However, we want to control whether the Java application will execute the worker code or not and if we want the application to communicate with Temporal. I have executed the factory.shutdown() and the workers have stopped, but I still see in the logs the following: Resetting gRPC connection backoff, ping messages etc.

It seems as if the Client still keeps the connection to Temporal open. Is there anyway to disconnect the client from Temporal Server without restarting the Java process?

Thanks,
Jay.

You can call the WorkflowServiceStubs shutdown method to cleanly close TCP connections that the gRPC library keeps alive.

1 Like

Thanks @tihomir. I had done that but was still seeing connection being kept alive - however, it looks like that was caused by some remnants of previous testing. Complete reset of the system and connection shuts down cleanly now.

1 Like