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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -