Class EventConsumerExecutorProducer
java.lang.Object
org.a2aproject.sdk.server.util.async.EventConsumerExecutorProducer
Produces a dedicated executor for EventConsumer polling threads.
CRITICAL: EventConsumer polling must use a separate executor from AgentExecutor because:
- EventConsumer threads are I/O-bound (blocking on queue.poll()), not CPU-bound
- One EventConsumer thread needed per active queue (can be 100+ concurrent)
- Threads are mostly idle, waiting for events
- Using the same bounded pool as AgentExecutor causes deadlock when pool exhausted
Uses a cached thread pool (unbounded) with automatic thread reclamation:
- Creates threads on demand as EventConsumers start
- Idle threads automatically terminated after 10 seconds
- No queue saturation since threads are created as needed
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceQualifier annotation for EventConsumer executor injection. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EventConsumerExecutorProducer
public EventConsumerExecutorProducer()
-
-
Method Details
-
eventConsumerExecutor
-