Exemplo n.º 1
0
        public CaptureProcessorHost(
            string namespaceName, string eventHubName, string eventHubConnectionString, int partitionCount,
            string consumerGroup, string leaseContainerName, string captureStorageAccountConnectionString,
            string captureContainerName, string captureFileNameFormat,
            DateTime?startingAt = null)
        {
            this.details = new (
                NamespaceName : namespaceName,
                EventHubName : eventHubName,
                PartitionCount : partitionCount,
                CaptureStorageAccountConnectionString : captureStorageAccountConnectionString,
                CaptureContainerName : captureContainerName,
                CaptureFileNameFormat : captureFileNameFormat,
                StartingAt : startingAt,
                ConsumerGroup : consumerGroup,
                LeaseContainerName : leaseContainerName,
                EventHubConnectionString : eventHubConnectionString);

            this.host = new (
                eventHubPath : details.EventHubName,
                consumerGroupName : details.ConsumerGroup,
                eventHubConnectionString : details.EventHubConnectionString,
                storageConnectionString : details.CaptureStorageAccountConnectionString,
                leaseContainerName : details.LeaseContainerName);
        }
Exemplo n.º 2
0
        internal CaptureProcessor(IEventProcessor eventProcessor, EventHubsDetails eventHubsDetails, PartitionContext partitionContext)
        {
            this.eventProcessor   = eventProcessor;
            this.eventHubsDetails = eventHubsDetails;
            this.partitionContext = partitionContext;

            if (eventHubsDetails.StartingAt != null && eventHubsDetails.StartingAt != DateTime.MinValue)
            {
                useStartFile = true;
                startString  = GetStartString(partitionContext);
            }
        }