Hi all,

I have refactored a legacy Java application (i.e. no web container) to use 
Camel to send messages from files to a queue.  I chose to describe my routes in 
XML so the routes could be re-used in a future Spring web application.  My 
legacy application loads the XML routes using 
ModelCamelContext.loadRoutesDefinition().  

Because I don't have Spring, I'm limited in what I can describe in my XML file. 
 Although the documentation isn't too specific, I believe that the XML file can 
only contain routes.  For example, I can't declare beans in the XML file, so I 
declare them in a SimpleRegistry and provide that to the CamelContext before I 
load the routes definition file.

I am having trouble finding a way to give Camel a retry strategy for when there 
are connectivity issues with the broker.  How would I give Camel instructions 
on how many times to retry, backoff multipliers, etc?

Since my XML file only contains routes, it doesn't seem like I can use 
<onException> or <errorHandler>.  Is there some alternate way to declare either 
of these, without switching to the Java DSL?

(Also, according to 
http://camel.465427.n5.nabble.com/global-onException-doesnt-apply-for-routes-loaded-with-loadRoutesDefinition-td4288369.html#a4290365,
 it appears that routes loaded via loadRoutesDefinition don't get the benefit 
of onException anyway, at least not until Camel 3.)

If I'm on the wrong track, is there some other way that I can tell Camel to 
retry periodically (forever) when it is unable to send to a queue?

Thanks,
Mark

Reply via email to