apache camel polling a rest endpoint
<p>I have a rest endpoint sample.org which returns a json response of the form </p>

<pre><code>{
  "response" : "pending" 
}
</code></pre>

<p>My route looks like this</p>

<pre><code>from("http://sample.org")
.marshal(xmlFormatConverterUtil.getxmlJsonDataFormat())  //To convert into json as I receive data in xml format which needs to be converted to json
</code></pre>

<p>I read about <a href="http://camel.apache.org/polling-consumer.html" rel="nofollow noreferrer">polling consumer</a> but couldn't find an example on how to keep polling the endpoint, till it returns response as "success".</p>

<p>Should a polling consumer be used ? If so can an example relevant to my case be illustrated. Any other resource to poll rest endpoints will be highly useful.</p>