Hi Camel folks, I am currently looking for a simple approach achieving the following in Apache Camel / Spring Boot:
1. Send a search job request to an external REST/JSON API 2. Get a search processing job ID from the API 3. Poll the API until it returns a JSON response containing a specific status = done 4. Once status done has been returned, proceed with the retrieval of the search result (separate part, considered to be straight forward) The first solution one may think of is to implement the Polling Consumer pattern, which in my opinion requires too much overhead code (need to implement Component, Endpoint, Consumer,...) and more important this pattern does the contrary - it returns a message once a message is available (e.g. https://github.com/Palo-IT/Examples/tree/master/camel-custom-feedly-component). Another approach would be a simple Processor where I loop a defined number of times calling the API or using the DSL -> doWhile... As I was unable to find a good code snippet, it would be cool if you guys can share your thoughts or point me to a good sample. Cheers, Simon -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Routing-Best-practice-how-to-poll-an-external-REST-API-tp5809926.html Sent from the Camel - Users mailing list archive at Nabble.com.