Using loop EIP to solve a Usecase in Apache Camel -
i have usecase in have route takes m number of rest urls' input , hits each of these urls's n number of times each until response code comes out 204.
so hit url until 204 response code , if returns 204 move on next url , apply same procedure.
i tried use loop eip did not work.please suggest.
if understood requirement correctly, should trick:
<from uri="bean:cxf...." /> <setexchangepattern pattern="inout"/> <to uri="jetty...." /> //hit url <choice> <when> <simple>check_if_http_response_code_header_is_204</simple> <to uri="mock:result" /> </when> <otherwise> <to uri="bean:cxf...." /> //send exchange route again </otherwise> </choice>
Comments
Post a Comment