-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 2.16.3, 2.17.3
-
Fix Version/s: None
-
Component/s: camel-core, camel-jetty
-
Labels:None
-
Estimated Complexity:Unknown
The following proxy will accept incoming calls on http://localhost:8888/lb and respond to them.
<?xml version="1.0" encoding="UTF-8"?> <blueprint xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd" xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <camelContext id="test-ctx" xmlns="http://camel.apache.org/schema/blueprint"> <route streamCache="true"> <from uri="jetty:http://0.0.0.0:8888/lb/?matchOnUriPrefix=true" /> <removeHeaders pattern="CamelServlet.*"/> <removeHeaders pattern="CamelHttpServlet.*"/> <removeHeader headerName="CamelHttpUri"/> <loadBalance inheritErrorHandler="false"> <failover maximumFailoverAttempts="1" /> <to uri="jetty:http://localhost:8889/1/?bridgeEndpoint=true&throwExceptionOnFailure=true" /> <to uri="jetty:http://localhost:8888/2/?bridgeEndpoint=true&throwExceptionOnFailure=false" /> </loadBalance> </route> <route> <from uri="jetty:http://0.0.0.0:8888/2/?matchOnUriPrefix=true" /> <setBody><constant>2</constant></setBody> </route> </camelContext> </blueprint>
When nothing runs on port 8889 (the first node in the failover), the expected behaviour is to respond always with the number 2.
The observed behaviour is, that service respond with returning the request back for the first call. If the second call is made within a short time (up to 30 second in my case), the service will respond correctly.
Workaround is to use for example http4 instead of jetty:http.
Tried with camel 2.17.3 and 2.16.3