camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bannii <Michael.Ban...@evry.com>
Subject A non-blocking alternative to MulticastProcessor?
Date Wed, 03 Sep 2014 13:00:53 GMT
Hi,

I evaluated Camel's MulticastProcessor for asynchronous processing and get somewhat disappointed
because it actually blocks N+1 threads (N is a fork factor in a particular multicast). And
then around blocking code I found next comments:

MulticastProcessor lines 323-327:

            // its to hard to do parallel async routing so we let the caller thread be synchronously
            // and have it pickup the replies and do the aggregation (eg we use a latch to
wait)
            // wait for aggregation to be done
            LOG.debug("Waiting for on-the-fly aggregation to complete aggregating {} responses
for exchangeId: {}", total.get(), original.getExchangeId());
            aggregationOnTheFlyDone.await();

MulticastProcessor lines 710-711:

            // we invoke it synchronously as parallel async routing is too hard
            AsyncProcessorHelper.process(async, exchange);


Is there a non-blocking threadless-wait alternative to the MulticastProcessor?


--
Best regards
Michael


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message