Adriano Machado created CAMEL-26473:
---------------------------------------

             Summary: camel-base-engine - AsyncProcessorAwaitManager: create 
the latch only when the callback is still pending
                 Key: CAMEL-26473
                 URL: https://issues.apache.org/jira/browse/CAMEL-26473
             Project: Camel
          Issue Type: Sub-task
            Reporter: Adriano Machado
            Assignee: Adriano Machado
             Fix For: 4.24.0


Tier 2 item of CAMEL\-25132. {{DefaultAsyncProcessorAwaitManager.process}} 
allocates a {{CountDownLatch}} on every synchronous over asynchronous call, 
which is every {{ProducerTemplate}} send and every 
{{AsyncProcessorSupport.process\(Exchange\)}}. A temporary counter showed the 
callback had already fired when {{process}} returned in 100% of the calls, for 
routes with processors, sub routes, split, multicast, redelivery and seda, so 
the latch was not waited on.

The latch can be created only when the callback has not fired yet when the 
processor returns, with an atomic handshake for a callback arriving at that 
moment. Waiting, the blocked exchanges view and forcing a blocked exchange to 
complete keep working as they do.

_Claude Code on behalf of Adriano Machado \(@ammachado\)_

_This was generated by an AI agent and may contain inaccuracies. Please verify 
before relying on it._





--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to