-
Notifications
You must be signed in to change notification settings - Fork 0
Best Practices
Jon Druse edited this page Aug 28, 2019
·
2 revisions
So with a basic understanding of how the Forge Replication API works, let's walk through how to construct a consumer.
Here's the basic order of operations a consumer needs to complete to properly replicate all the data available.
- Establish an initial value for
last_event_id, which should be0 - Request results by providing
last_event_id - Extract
latest_eventfrom the response and save it tolast_event_id - Process
resultsarray - If
remainingis greater than0, go to step 2 - If
remainingis0wait at least 1 minute and then go to step 2
- This process is intended to be run on a single thread. Each request requires information of the request before it, so trying to parallelize this process will not be possible.