camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Robson <>
Subject Throwing exceptions from Enrichers
Date Fri, 26 Nov 2010 08:48:55 GMT

I was wondering what the best way to throw an exception from an  
aggregator is so I can catch it in the camel route. Currently I have  
the following route:

             <from uri="jms:ethos_marc_loaded" />
             <bean ref="marc2marcxml" />
             <setHeader headerName="CamelHttpUri">
             <enrich uri="http://localhost:8888"  
strategyRef="AddBibIdsToMETS" />
             <to uri="jms:ethos_ingest" />

<bean id="AddBibIdsToMETS"  
class="" />

AddBibIdsToMETS is a custom aggregation strategy implementing the  
org.apache.camel.processor.aggregate.AggregationStrategy interface and  
it implements the following method:

Exchange aggregate(Exchange oldExchange, Exchange newExchange)
which means I can't just throw the exception from the method.

Whats the best way to get round this?

Thanks for your help

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