java - Using OnException within a route containing aggregator -
i trying use onexception clause within route has aggregator in it. expecting whenever exception thrown within aggregate() method of aggregator, onexception clause should catch it, handle , redeliver it. however, doesnt seem happening. can please suggest going wrong.
from("jms:queue:start?concurrentconsumers=10").routeid("testroute") .onexception(exception.class).log("exception caught").process(new processor() { @override public void process(exchange exchange) throws exception { logger.debug("****exception caught***"); } }) .handled(true).maximumredeliveries(-1).end() .transacted() .aggregate(header("correlationheader"), new customaggregator()) .completionsize(50). to("jms:queue:end");
where customaggregator aggregator , within aggregate method throwing exception test exception handling.
any or suggestion appreciated.
Comments
Post a Comment