Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion references/java/integrations/spring-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ Media image = new Media(MimeTypeUtils.IMAGE_PNG, URI.create("https://cdn.example

For anything larger than a small thumbnail, route the bytes to a binary store from an Activity and pass only the URL across the conversation.


## Vector stores, embeddings, and MCP

When the corresponding Spring AI modules (`spring-ai-rag`, `spring-ai-mcp`) are on the classpath, the integration registers Activities for vector stores, embeddings, and MCP tool calls automatically. Inject the matching Spring AI types into your Activities or Workflows and use them as you would in any Spring AI application — each operation executes through a Temporal Activity.
Expand Down
33 changes: 33 additions & 0 deletions references/python/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,39 @@ worker = Worker(
)
```

## DNS Resolver Configuration

`DnsLoadBalancingConfig` makes Core periodically re-resolve the client's target host and round-robin requests across the resolved addresses . Use it when `target_host` resolves to multiple A/AAAA records (e.g., a load-balanced gRPC frontend, multi-address private endpoints) and you want the client to spread RPCs across them.

It is **not** the mechanism that makes Temporal Cloud HA failover work — failover is driven by Temporal Cloud rewriting a CNAME record and the OS resolver re-resolving on TTL expiry (`docs/cloud/high-availability/ha-connectivity.mdx:25-31`).

### Configuration

```python
from temporalio.client import Client
from temporalio.service import DnsLoadBalancingConfig

client = await Client.connect(
"frontend.example.internal:7233",
dns_load_balancing_config=DnsLoadBalancingConfig(
resolution_interval_millis=5000, # re-resolve every 5 seconds
),
)
```

- The only field is `resolution_interval_millis: int = 30000` — how often to re-resolve DNS, in milliseconds.
- `DnsLoadBalancingConfig.default` is a pre-built instance with the default 30-second interval.
- The `Client.connect` kwarg is `dns_load_balancing_config: DnsLoadBalancingConfig | None = None` . Per the docstring: *"Default is to re-resolve DNS every 30s. Can be set to `None` to disable. Silently disabled when `http_connect_proxy_config` is set, since the two are mutually exclusive."*
- Pass `dns_load_balancing_config=None` to disable DNS load balancing entirely.

### Mutual exclusion with HTTP CONNECT proxy

DNS load balancing and `HttpConnectProxyConfig` cannot be used together. When `http_connect_proxy_config` is set on the same client, DNS load balancing is **silently disabled** — there is no error and no precedence flag. If you need both, you cannot have both; choose the one your network requires.

### CloudOperationsClient

`CloudOperationsClient.connect` accepts the same `dns_load_balancing_config` kwarg , but its documented default differs: *"Default is disabled. Silently disabled when `http_connect_proxy_config` is set, since the two are mutually exclusive."*

## Workflow Init Decorator

You should always put state initialization logic in the `__init__` of your workflow class, so that it happens before signals/updates arrive.
Expand Down