DefaultRequestHandler (v2) ignores queue_manager, so the per-task event queue bound (1,024) cannot be configured
維護者通常 2 天內回覆
@mykytanetipa 已經在處理了。
開始於 2026年10月19日。
評估
這個 Issue 還沒有評估資料。
描述
Summary
Passing a queue_manager to DefaultRequestHandler produces
DeprecationWarning: A queue_manager was passed to DefaultRequestHandlerV2, but it is not used: v2 delegates
event streaming to an in-memory ActiveTaskRegistry, so custom or distributed QueueManager implementations
are ignored. ...
ActiveTask then builds its queues with the module default (EventQueueSource() /
DEFAULT_MAX_QUEUE_SIZE = 1024), and nothing on DefaultRequestHandler, ActiveTaskRegistry or
ActiveTask lets an application change it.
Why it matters
The bounded queue is what gives a streaming server backpressure: when a client connects and stops reading, the
queue fills, the producer (the agent executor) blocks and stops pulling tokens from the model, and a slow
subscriber is evicted. We verified this end to end and it works well. But 1,024 events is a fixed trade-off:
- a deployment streaming single tokens may want a smaller bound (less memory per stalled client, faster
eviction); one streaming large chunks may want a different one; - with many concurrent tasks the worst-case memory is
tasks x 1,024 x event size, which the operator cannot
tune.
Evidence
A client that opens POST /message:stream and never reads, against an agent producing 300,000 small events with
no delay: the SDK evicts the stalled sink ("queue full at delivery time"), process memory stays flat (about
80 MB), the server keeps answering other callers, and the task ends at its own deadline. So the mechanism is
sound; only its size is fixed.
Suggested change
Accept an optional size where the queues are created, for example DefaultRequestHandler(..., max_event_queue_size: int = DEFAULT_MAX_QUEUE_SIZE) passed to ActiveTaskRegistry and on to
EventQueueSource. Keep the default so nothing changes for existing users.
Environment
a2a-sdk 1.2.1 and 1.2.2, Python 3.11 to 3.13, FastAPI/Starlette routes via create_jsonrpc_routes and
create_rest_routes.
Found while building slow-consumer backpressure tests for a downstream adapter (lemonade-a2a).
- 主要語言
- Python
- 星號
- 2.2k
- 分支
- 518
- 平均合併
- 3 天 12 小時
- 30 天內合併 PR
- 39
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
a2aproject/a2a-python 的其他 Issue
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameter可能已有人在做 @rohityan 於 60 天前認領。 未關閉component: server status:awaiting response
難度 2/5 1-3 小時 新手友好度 75/100
a2aproject/a2a-python#1204 · 3 則留言 · 已指派 1 人 ·
維護者通常 2 天內回覆
-
[Bug]: REST task/request id sanitization可能已有人在做 @Linux2010 於 119 天前認領。 未關閉maintainers-only
難度 2/5 1-3 小時 新手友好度 65/100
a2aproject/a2a-python#805 · 1 則留言 ·
維護者通常 2 天內回覆
-
[Bug]: TaskEventStream methods don't receive ServerCallContext可能已有人在做 @rohityan 於 1 天前認領。 未關閉
a2aproject/a2a-python#1374 · 已指派 2 人 ·
維護者通常 2 天內回覆
-
[Bug]: v0.3 JSON-RPC compat adapter returns -32603 for all A2A errors (e.g. TaskNotFound should be -32001)可能已有人在做 @shwetangsinha0509 於 2 天前認領。 未關閉component: server status:awaiting response
a2aproject/a2a-python#1368 · 2 則留言 · 已指派 1 人 ·
維護者通常 2 天內回覆
-
[Bug]: VersionedDatabaseTaskStore get() and delete() fail with "no such table" when initialize() was not called可能已有人在做 @cchinchilla-dev 於 3 天前認領。 未關閉component: server status:awaiting response
a2aproject/a2a-python#1356 · 1 則留言 · 已指派 1 人 ·
維護者通常 2 天內回覆
查看 a2aproject/a2a-python 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
維護者通常 1 天內回覆
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directory可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉difficulty:2 enhancement good first issue
難度 1/5 1-3 小時 新手友好度 92/100
MakazhanAlpamys/Soup#2178 ·
維護者通常 1 天內回覆
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-values未關閉
難度 2/5 1-3 小時 新手友好度 75/100
scverse/rapids-singlecell#854 ·
維護者通常 1 天內回覆
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGL可能已有人在做 @ninglinLiu 今天認領。 未關閉area:frontend backend:slang bug direction:input
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=False可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 13 天內回覆