Why is the publicClient property needed?

Hello

I was just wondering why the publicClient property is needed in the configuration. Doesn’t temporal already know all the nodes members in the network? Can’t the worker node connect to the frontend node using that information anyway?

This is used for components in the server which uses Go SDK to implement certain long running operations using Temporal itself. Temporal server has an internal namespace temporal_system which is used by the server for some system operations. Most of this lives in the worker role which creates a Temporal worker on startup and uses publicClient property to discover frontend for the Temporal server.
Some other parts of the system also uses this for calling Start/Signal for system workflows. An example of that is enforcement of ParentClosePolicy when a workflow completes.

1 Like