James Netherton created CAMEL-23804:
---------------------------------------

             Summary: camel-platform-http-vertx: SSE (text/event-stream) 
responses buffer events instead of flushing eagerly
                 Key: CAMEL-23804
                 URL: https://issues.apache.org/jira/browse/CAMEL-23804
             Project: Camel
          Issue Type: Improvement
          Components: camel-platform-http-vertx
            Reporter: James Netherton
            Assignee: James Netherton
             Fix For: 4.21.0


The camel-platform-http-vertx AsyncInputStream greedily fills its read buffer 
(default 16KB) before emitting data to the HTTP response. For normal responses 
this is fine, but for Server-Sent Events (text/event-stream) it causes all 
events to batch into a single chunk instead of being delivered progressively as 
they are produced.

A typical SSE event is small (100-300 bytes). The doRead method recurses via 
buffer.hasRemaining() until the full buffer is filled, meaning ~50+ events get 
coalesced into one write. Clients don't receive any events until either the 
buffer fills or the stream closes.

This makes real-time SSE streaming non-functional on platform-http-vertx. The 
A2A component documents this as a known limitation and recommends Undertow or 
Jetty as a workaround, but on Quarkus platform-http is the only option.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to