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
@@ -166,3 +166,69 @@ with DurableTaskSchedulerWorker(host_address=endpoint, secure_channel=secure_cha
166
166
167
167
**NOTE**
168
168
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.
169
+
170
+
### Work item filtering
171
+
172
+
By default a worker receives **all** work items from the backend,
173
+
regardless of which orchestrations, activities, or entities are
174
+
registered. Work item filtering lets you explicitly tell the backend
175
+
which work items a worker can handle so that only matching items are
176
+
dispatched. This is useful when running multiple specialized workers
177
+
against the same task hub.
178
+
179
+
Work item filtering is**opt-in**. Call `use_work_item_filters()` on
180
+
the worker before starting it.
181
+
182
+
#### Auto-generated filters
183
+
184
+
Calling `use_work_item_filters()`with no arguments builds filters
185
+
automatically from the worker's registry at start time:
186
+
187
+
```python
188
+
with DurableTaskSchedulerWorker(...) as w:
189
+
w.add_orchestrator(my_orchestrator)
190
+
w.add_activity(my_activity)
191
+
w.use_work_item_filters() # auto-generate from registry
192
+
w.start()
193
+
```
194
+
195
+
When versioning is configured with`VersionMatchStrategy.STRICT`,
196
+
the worker's version is included in every filter so the backend
197
+
only dispatches work items that match that exact version.
198
+
199
+
#### Explicit filters
200
+
201
+
Pass a `WorkItemFilters` instance for fine-grained control:
0 commit comments