object starts its life from being generated by the
subscriptionWorker = store.Subscriptions.GetSubscriptionWorker<Order>(subscriptionName);
At this point, the worker has only got its configuration. No connection or processing happens at this moment.
In order to start processing, the
Run method should be called. The Run method receives the batch processing logic that should be performed:
subscriptionRuntimeTask = subscriptionWorker.Run(batch =>
// your logic here
From this point on, the subscription worker will start processing batches. If for any reason, the processing is aborted, and the returned task (
subscriptionRuntimeTask) will be finished with an exception.