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
@@ -352,3 +352,69 @@ with DurableTaskSchedulerWorker(host_address=endpoint, secure_channel=secure_cha
352
352
353
353
> [!NOTE]
354
354
> 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.
355
+
356
+
### Work item filtering
357
+
358
+
By default a worker receives **all** work items from the backend,
359
+
regardless of which orchestrations, activities, or entities are
360
+
registered. Work item filtering lets you explicitly tell the backend
361
+
which work items a worker can handle so that only matching items are
362
+
dispatched. This is useful when running multiple specialized workers
363
+
against the same task hub.
364
+
365
+
Work item filtering is**opt-in**. Call `use_work_item_filters()` on
366
+
the worker before starting it.
367
+
368
+
#### Auto-generated filters
369
+
370
+
Calling `use_work_item_filters()`with no arguments builds filters
371
+
automatically from the worker's registry at start time:
372
+
373
+
```python
374
+
with DurableTaskSchedulerWorker(...) as w:
375
+
w.add_orchestrator(my_orchestrator)
376
+
w.add_activity(my_activity)
377
+
w.use_work_item_filters() # auto-generate from registry
378
+
w.start()
379
+
```
380
+
381
+
When versioning is configured with`VersionMatchStrategy.STRICT`,
382
+
the worker's version is included in every filter so the backend
383
+
only dispatches work items that match that exact version.
384
+
385
+
#### Explicit filters
386
+
387
+
Pass a `WorkItemFilters` instance for fine-grained control:
0 commit comments