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
{{ message }}
Repository navigation
DefaultRequestHandler (v2) ignores queue_manager, so the per-task event queue bound (1,024) cannot be configured #1339
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).
Activity
rohityan commentedon Oct 15, 2026
Hi @swamx, thanks for submitting this feature request. We appreciate you sharing this suggestion along with your testing.
Your feature request has been received by the team and is currently under review.
rohityan commentedon Oct 15, 2026
Hi @ishymko , PTAL