davsclaus opened a new issue, #146:
URL: https://github.com/apache/camel-jbang-examples/issues/146

   No example sends one request to several services at the same time, waits a 
limited time, and picks the best answer (the scatter-gather pattern). It is a 
common integration task, and models get it wrong: `multicast` with 
`parallelProcessing`, `timeout` and an aggregation strategy together, and a 
failing branch inside a multicast.
   
   Proposed example, `route/scatter-gather`, with the shop story: for each 
restock request the shop asks three suppliers for a quote at the same time, 
waits at most two seconds, and picks the lowest price, with the shorter 
delivery time on the same price. The suppliers are `platform-http` routes in 
the same example, so no other service is needed. Supplier B is the cheapest but 
answers after 3 seconds; supplier C does not sell hoodies and answers 404.
   
   Build it step by step:
   1. Three supplier routes, and a file route that asks A, B and C one after 
another.
   2. Ask the three at the same time, and wait at most two seconds.
   3. A supplier that fails is logged, and the others are used.
   4. Pick the lowest price; on the same price, the shorter delivery time.
   
   With a Citrus YAML test, run with `camel test run`.
   
   _Claude Code on behalf of davsclaus_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to