new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Temporal · all subjects

workers: setup & configuration

14 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Connect to local Temporal Service in Java

Use the `WorkflowServiceStubs.newLocalServiceStubs()` method to create a stub that points to the Temporal development service running on the local machine at the default port 7233. Then use `WorkflowClient.newInstance(serviceStub)` to create a Temporal Client. When not specifying a custom Namespace, the Client connects to the `default` Namespace.

Set custom Namespace for local Temporal Client in Java

Use the `WorkflowClientOptions.Builder.setNamespace` method to set a custom Namespace. Then pass the `clientOptions` to the `WorkflowClient.newInstance` method.

Java SDK configuration file location

The SDK looks for a TOML configuration file at the path `~/.config/temporalio/temporal.toml`. You can also specify a custom location using the environment variable `TEMPORAL_CONFIG_FILE` or by providing the path directly in code.

Environment variables override configuration file settings in Java SDK

Connection options set in configuration files have lower precedence than environment variables. If you set the same option in both the configuration file and as an environment variable, the environment variable value overrides the option set in the configuration file.

Load configuration profile from TOML file in Java

Use `ClientConfigProfile.load` with `LoadClientConfigProfileOptions.newBuilder().setConfigFilePath(configFilePath).build()` to load a profile from a TOML configuration file. Then call `profile.toWorkflowServiceStubsOptions()` and `profile.toWorkflowClientOptions()` to convert the profile to the appropriate options objects.

Load configuration from environment variables in Java

Use `ClientConfigProfile.load(LoadClientConfigProfileOptions.newBuilder().build())` to load all environment variables. This also loads the default profile from a configuration file at the default location or location specified by `TEMPORAL_CONFIG_FILE` if it exists. Environment variables take precedence over configuration file settings.

Go SDK default HostPort for local development

If you do not provide HostPort when connecting to a local development Temporal Service, the Client defaults the address and port number to 127.0.0.1:7233, which is the port of the development Temporal Service.

Environment variable and configuration file support in Go SDK

Environment variable and configuration file support for Temporal Client connection options were added in Go SDK v1.28.0.

TOML configuration file default location for Temporal Client

If you do not provide the configuration file path, the Go SDK looks for it at the path ~/.config/temporalio/temporal.toml.

Configuration file precedence over environment variables

Connection options set in configuration files have lower precedence than environment variables. If you set the same option in both the configuration file and as an environment variable, the environment variable value overrides the option set in the configuration file.

TOML profile structure for Temporal Client configuration

A TOML configuration file lets you configure multiple profiles, each with its own set of connection options. You can then specify which profile to use when creating the Temporal Client using the ConfigFileProfile parameter in envconfig.LoadClientOptions().

Load Temporal Client options from TOML configuration file

Use the envconfig.LoadClientOptions() function with ConfigFilePath and ConfigFileProfile parameters to load connection options from a TOML configuration file and create a Temporal Client with the specified profile.

Temporal Cloud gRPC endpoint format and benefits

The recommended endpoint for Temporal Cloud is the gRPC Namespace endpoint in format <namespace>.<account>.tmprl.cloud:7233. This endpoint works for all Namespaces and automatically directs traffic to the active region for Namespaces with High Availability.

Load base configuration and override options programmatically in Go

You can load a base configuration from environment variables or a configuration file using envconfig.MustLoadDefaultClientOptions(), then override specific options programmatically by modifying the returned ClientOptions object before passing it to client.Dial().

Give your agent this brain