Apache Camel Routing: Best practice how to poll an external REST API

2017-08-08 Thread simon_dietschi
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

Re: Apache Camel Routing: Best practice how to poll an external REST API

2017-08-08 Thread Steve Huston
I don’t have example code readily available, but one possible approach would be: - Send job request REST/JSON and get job ID back - Add ID to a queue of not-yet-done jobs - A separate route pulls job IDs from the not-done queue and polls - If not done, put it back on the queue - If done,