Rechecks status of orders in the order tracker when
a) Connector's ability to reconcile becomes active (i.e. after Connector was started or got reconnected)
b) on manual invocation via GET /rest/execution/reconciliation.
The check is done by loading order statuses via each respective Rest adapter. The load is done asynchronously to prevent adapter disconnecting in case the load takes a while.
One way to test reconciliation is to place an order that gets filled (or cancelled out of AT when AT is not running), stop AT, remove the last entry from the order_status table and
start AT again. This will make AT reconcile the order status using the mechanism implemented here.
public java.util.concurrent.Future<java.lang.Void> runReconciliation()
Runs asynchronously the reconciliation for all active connector instances
that are capable of Capability#RECONCILIATION on the executor service
defined specifically for reconciliation tasks. Individual asynchronous reconciliation
futures are combined into one future that is returned.
combined future of all individual reconciliation futures
public java.util.concurrent.Future<java.lang.Void> runReconciliation(long accountId)
Runs the reconciliation for connector instance with a specific accountId.
accountId - account id of the connector instance that will be reconciled
future that represents the reconciliation process/progress