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: CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ just publish # bump version to $GITHUB_REF_NAME, build, publish to PyPI
15
15
16
16
Run a single test file or test by name:
17
17
```bash
18
-
uv run --no-sync pytest tests/committer/test_kafka_committer.py
18
+
uv run --no-sync pytest tests/test_kafka_committer.py
19
19
uv run --no-sync pytest -k test_committer_logs_task_exceptions
20
20
```
21
21
@@ -43,6 +43,6 @@ Runs as a background asyncio task (spawned via `spawn()`). Collects `KafkaCommit
43
43
44
44
## Key patterns
45
45
46
-
-**Singleton reset in tests**: `KafkaConcurrentHandler._initialized = False` and `._instance = None` must be reset between tests (done in conftest fixtures via `stop_concurrent_processing`).
46
+
-**Singleton reset in tests**: `KafkaConcurrentHandler._initialized = False` and `._instance = None` must be reset between tests. Each test file does this directly in an `autouse``reset_singleton` fixture — not via `stop_concurrent_processing`.
47
47
-**Type suppression**: use `# ty: ignore[rule-name]` (not `# type: ignore`) for ty type checker suppressions.
48
48
-**No `from __future__ import annotations`**: annotations are evaluated eagerly; `typing.Self`/`typing.Never` are used directly (requires Python ≥ 3.11).
Copy file name to clipboardExpand all lines: README.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,7 @@ app = FastStream(broker)
29
29
asyncdefon_startup(context: ContextRepo) -> None:
30
30
await initialize_concurrent_processing(
31
31
context=context,
32
-
concurrency_limit=20, # max concurrent tasks (0 = unlimited)
33
-
commit_batch_size=100, # commit after this many messages
34
-
commit_batch_timeout_sec=5, # or after this many seconds
32
+
concurrency_limit=20, # max concurrent tasks (0 = unlimited)
35
33
)
36
34
37
35
@@ -64,7 +62,16 @@ With batch commit enabled, offsets are committed per partition at the highest co
64
62
65
63
## Consumer group filtering
66
64
67
-
When multiple consumer groups share a topic, messages can be tagged with a `topic_group` header. The middleware will only process messages whose `topic_group` header matches the consumer's group ID, skipping the rest.
65
+
When multiple consumer groups subscribe to the same topic, producers can tag messages with a `topic_group` header to direct them to a specific group. The middleware skips messages whose `topic_group` header doesn't match the consumer's group ID. Messages with no `topic_group` header are always processed.
66
+
67
+
```python
68
+
# Producer side — send to a specific consumer group only
0 commit comments