Camel loadBalance failover maximumFailoverAttempts doesn't support properties
Issue
- On JBoss Fuse 6.2.1 Apache Camel 2.15.1, when I have
<loadBalance inheritErrorHandler="false" id="load-balance">
<failover maximumFailoverAttempts="2">
<exception>java.net.ConnectException</exception>
<exception>org.apache.cxf.transport.http.HTTPException</exception>
</failover>
<to id="sender-service1" uri="cxf:bean:some-service1-endpoint" />
<to id="sender-service2" uri="cxf:bean:some-service2-endpoint" />
- It works but when I try and use a parameter for maximumFailoverAttempts
<failover maximumFailoverAttempts="">
- I get the error:
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
- If I try and use "Using property placeholders for any kind of attribute in the XML DSL" from http://camel.apache.org/using-propertyplaceholder.html as described in Validation error with integer property (camel) e.g.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring" xmlns:context="http://www.springframework.org/schema/context"
xmlns:prop="http://camel.apache.org/schema/placeholder"
<failover prop:maximumFailoverAttempts="">
- I then get the error:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'prop:maximumFailoverAttempts' is not allowed to appear in element 'failover'.
- We are using other Camel properties and the property is set in our configuration file. How can I use a parameter for the maximumFailoverAttempts attribute?
Environment
- Red Hat JBoss Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
