@@ -318,6 +318,9 @@ To manage stream growth, when the message count exceeds `--router-snapshot-thres
...
@@ -318,6 +318,9 @@ To manage stream growth, when the message count exceeds `--router-snapshot-thres
Instead of launching the KV Router via command line, you can create a `KvPushRouter` object directly in Python. This allows per-request routing configuration overrides.
Instead of launching the KV Router via command line, you can create a `KvPushRouter` object directly in Python. This allows per-request routing configuration overrides.
>[!Warning]
> **Multiple Routers in Same Process**: If you need to run multiple `KvPushRouter` instances for fault tolerance or load distribution, you must launch them in **separate processes** (e.g., using `python -m dynamo.frontend` with different ports). Creating multiple `KvPushRouter` objects in the same Python process is not supported - they share the same cancellation token from the component's primary lease, so dropping one router will cancel all routers in that process. For in-process routing, use a single `KvPushRouter` instance.
### Methods
### Methods
The `KvPushRouter` provides the following methods:
The `KvPushRouter` provides the following methods: