I need to download incremental updates from a web service. The download URL has a "since" parameter specifying a timestamp, and will return updates after this timestamp:
http://super.service.com/update?since=4535463
This will return an update that contains a timestamp that must be supplied as "since" in the next request:
{ "timestamp": "453575", ... }
The route is triggered periodically by the Quartz component.
My question now is, what is the best way to do this in Camel? So far I have come up with:
All of these feel too complicated. Also, what is the best way to update the query parameter in the URL
Any pointers towards best practices would be greatly appreciated.
Regards, Jochen
Why don't you store them in a cache using camel-cache component? Then you can look up the latest timestamp that you got in your previous query from the cache and create your url. The cache component is quit easy to work with and you can use it as part of your java dsl without going into processors or beans.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.