You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features.md
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -311,3 +311,69 @@ with DurableTaskSchedulerWorker(host_address=endpoint, secure_channel=secure_cha
311
311
312
312
> [!NOTE]
313
313
> The worker and client output many logs at the `DEBUG` level that will be useful when understanding orchestration flow and diagnosing issues with Durable applications. Before submitting issues, please attempt a repro of the issue with debug logging enabled.
314
+
315
+
### Work item filtering
316
+
317
+
By default a worker receives **all** work items from the backend,
318
+
regardless of which orchestrations, activities, or entities are
319
+
registered. Work item filtering lets you explicitly tell the backend
320
+
which work items a worker can handle so that only matching items are
321
+
dispatched. This is useful when running multiple specialized workers
322
+
against the same task hub.
323
+
324
+
Work item filtering is**opt-in**. Call `use_work_item_filters()` on
325
+
the worker before starting it.
326
+
327
+
#### Auto-generated filters
328
+
329
+
Calling `use_work_item_filters()`with no arguments builds filters
330
+
automatically from the worker's registry at start time:
331
+
332
+
```python
333
+
with DurableTaskSchedulerWorker(...) as w:
334
+
w.add_orchestrator(my_orchestrator)
335
+
w.add_activity(my_activity)
336
+
w.use_work_item_filters() # auto-generate from registry
337
+
w.start()
338
+
```
339
+
340
+
When versioning is configured with`VersionMatchStrategy.STRICT`,
341
+
the worker's version is included in every filter so the backend
342
+
only dispatches work items that match that exact version.
343
+
344
+
#### Explicit filters
345
+
346
+
Pass a `WorkItemFilters` instance for fine-grained control:
0 commit comments