Spring instance is not starting if one of the route-builder instance is failed

48 Views Asked by At

We are initializing the 2 different camel routes via spring context xml,

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
    <camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
        <routeBuilder ref="DescriptiveInfoRoute"/>
        <routeBuilder ref="DescriptiveInfoRouteV2"/>
    </camelContext>
</beans>

Both the routes are separate each will having it's input properties files to read the input values. (which makes 2 input files should be compulsory in order for both the routes to get initialized and starts the application). Now we got a new requirement one input file may or may not present. So is there any way in the spring to successfully start the application even if one the route was successfully initialized.

Thanks in advance, Raghavan

0

There are 0 best solutions below