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.
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 processing is aborted for any reason, the returned task (
will be finished with an exception.