public ChangeFeedObserverFactory(
     SqlClientExtension destClient,
     ICosmosDbSink cosmosDbSink)
 {
     this.destinationType = DestinationType.CosmosDB;
     this.destClient      = destClient;
     this.cosmosDbSink    = cosmosDbSink;
 }
Exemplo n.º 2
0
 public CosmosDbFeedObserver(
     SqlClientExtension client,
     ICosmosDbSink cosmosDbSink)
 {
     this.client = client;
     this.destinationCollectionUri = UriFactory.CreateDocumentCollectionUri(
         client.DatabaseName,
         client.CollectionName);
     this.cosmosDbSink    = cosmosDbSink;
     this.isBulkIngestion = ConfigHelper.IsBulkIngestion();
 }
Exemplo n.º 3
0
        public ChangeFeed(
            ICosmosDbSink cosmosDbSink,
            ILoggerFactory loggerFactory)
        {
            if (cosmosDbSink == null)
            {
                throw new ArgumentNullException(nameof(cosmosDbSink));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            this.cosmosDbSink  = cosmosDbSink;
            this.loggerFactory = loggerFactory;
            this.logger        = loggerFactory.CreateLogger <ChangeFeed>();
        }
        public ChangeFeedObserverFactory(
            IMongoCollection <BsonDocument> destDocStoreCollection,
            int insertRetries,
            ICosmosDbSink cosmosDbSink,
            ILoggerFactory loggerFactory)
        {
            if (destDocStoreCollection == null)
            {
                throw new ArgumentNullException(nameof(destDocStoreCollection));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            this.destinationType        = DestinationType.MongoDB;
            this.destDocStoreCollection = destDocStoreCollection;
            this.insertRetries          = insertRetries;
            this.cosmosDbSink           = cosmosDbSink;
            this.loggerFactory          = loggerFactory;
            this.logger = loggerFactory.CreateLogger <ChangeFeedObserverFactory>();
        }
        public ChangeFeedObserverFactory(
            SqlClientExtension destClient,
            ICosmosDbSink cosmosDbSink,
            ILoggerFactory loggerFactory)
        {
            if (destClient == null)
            {
                throw new ArgumentNullException(nameof(destClient));
            }
            if (cosmosDbSink == null)
            {
                throw new ArgumentNullException(nameof(cosmosDbSink));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            this.destinationType = DestinationType.CosmosDB;
            this.destClient      = destClient;
            this.cosmosDbSink    = cosmosDbSink;
            this.loggerFactory   = loggerFactory;
            this.logger          = loggerFactory.CreateLogger <ChangeFeedObserverFactory>();
        }
Exemplo n.º 6
0
 public ChangeFeed(ICosmosDbSink cosmosDbSink)
 {
     this.cosmosDbSink = cosmosDbSink;
 }