DefaultRequestHandler (v2) ignores queue_manager, so the per-task event queue bound (1,024) cannot be configured
Maintainer antworten meist innerhalb von 2 Tagen
@ishymko arbeitet bereits daran.
Seit 15.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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).
- Vorherrschende Sprache
- Python
- Sterne
- 2.2k
- Forks
- 511
- Ø Merge
- 3 T. 7 Std.
- Gemergte PRs (30 T.)
- 46
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus a2aproject/a2a-python
-
[Bug]: REST task/request id sanitizationEvtl. vergeben @Linux2010 hat das vor 111 Tagen übernommen. Offenmaintainers-only
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
a2aproject/a2a-python#805 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: Closing one client from a ClientFactory closes the shared httpx client for every other clientEvtl. vergeben @rohityan hat das heute übernommen. Offen
a2aproject/a2a-python#1349 · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: A2A exceptions lost their structured __repr__ after the client error refactor (#761)Evtl. vergeben @rohityan hat das heute übernommen. Offen
a2aproject/a2a-python#1347 · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: `A2A-Version` sent as a request parameter is ignored (spec §3.6.1), so a v1.0 request is treated as 0.3Evtl. vergeben @rohityan hat das heute übernommen. Offen
a2aproject/a2a-python#1344 · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 2 Tagen
-
[Bug]: Client transports reject responses with unrecognized fields (spec 5.7)Evtl. vergeben @rohityan hat das vor 2 Tagen übernommen. Offen
a2aproject/a2a-python#1341 · 1 Kommentar · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in a2aproject/a2a-python
Ähnliche Issues
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsOffenarea: tools documentation good first issue ready for a contributor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
eyalgolan/statecraft-israel#873 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 5 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag