[
https://issues.apache.org/jira/browse/CAMEL-27217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27217 started by shashank.
----------------------------------------
> camel-platform-http-vertx - a route that calls vertx-http on the same Vert.x
> hangs for good once as many requests are in flight as worker threads
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27217
> URL: https://issues.apache.org/jira/browse/CAMEL-27217
> Project: Camel
> Issue Type: Bug
> Components: camel-platform-http-vertx
> Reporter: shashank
> Assignee: shashank
> Priority: Major
>
> h3. What happens
> {{VertxPlatformHttpConsumer}} runs the route in {{vertx.executeBlocking}}
> with the synchronous {{getProcessor().process(exchange)}}, so the worker
> thread waits until the whole route is done. The vertx-http producer is
> asynchronous: it sends the request and, when the response arrives, completes
> the exchange in {{vertx.executeBlocking}} too (a worker thread, as the
> binding and the rest of the route may block).
> When both use the same Vert.x (a {{Vertx}} in the registry, which both
> components use, as in Camel Quarkus), a route
> {{from("platform-http:/x").to("vertx-http:...")}} with as many requests in
> flight as worker threads (20 by default in Vert.x) hangs for good: every
> worker thread waits for its route, and the completion of every vertx-http
> call waits for a free worker thread. No request is answered again, also after
> the load is gone; the vertx-http {{timeout}} does not help (its failure is
> completed the same way), and the platform-http {{requestTimeout}} only
> answers 503 while the worker threads stay blocked. A short slowdown of the
> backend (more requests in flight) is enough.
> h3. How to reproduce
> {{VertxPlatformHttpSharedVertxWorkerPoolTest}}: a Vert.x with 2 worker
> threads in the registry, a route platform-http -> vertx-http to a local
> backend that answers once both requests have arrived: neither request is
> answered.
> h3. Fix
> The consumer still starts the route on a worker thread (its first steps may
> block), but with the asynchronous processor: the worker thread is free as
> soon as the route continues on another thread, and the response is written on
> the context of the request when the route is done, as before.
> _Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)