Пример #1
0
 public void ProcessRecords(ProcessRecordsInput input)
 {
     if (ProcessFunc != null)
     {
         ProcessFunc.Invoke(input);
     }
 }
Пример #2
0
        /// <summary>
        /// This method processes the given records and checkpoints using the given checkpointer.
        /// </summary>
        /// <param name="input">
        /// ProcessRecordsInput that contains records, a Checkpointer and contextual information.
        /// </param>
        public void ProcessRecords(ProcessRecordsInput input)
        {
            // Process records and perform all exception handling.
            ProcessRecordsWithRetries(input.Records);

            // Checkpoint once every checkpoint interval.
            if (DateTime.UtcNow >= _nextCheckpointTime)
            {
                Checkpoint(input.Checkpointer);
                _nextCheckpointTime = DateTime.UtcNow + CheckpointInterval;
            }
        }
Пример #3
0
        /// <summary>
        /// This method processes the given records and checkpoints using the given checkpointer.
        /// </summary>
        /// <param name="input">
        /// ProcessRecordsInput that contains records, a Checkpointer and contextual information.
        /// </param>
        public void ProcessRecords(ProcessRecordsInput input)
        {
            Console.Error.WriteLine("Processing " + input.Records.Count + " records from " + _kinesisShardId);

            // Process records and perform all exception handling.
            ProcessRecordsWithRetries(input.Records);

            // Checkpoint once every checkpoint interval.
            if (DateTime.UtcNow >= _nextCheckpointTime)
            {
                Checkpoint(input.Checkpointer);
                _nextCheckpointTime = DateTime.UtcNow + CheckpointInterval;
            }
        }
Пример #4
0
        public void ProcessRecords(ProcessRecordsInput input)
        {
            Console.Error.WriteLine($"Processing {input.Records.Count} records from {this.shardId}");

            foreach (var record in input.Records)
            {
                var data = Encoding.UTF8.GetString(record.Data);
                Console.Error.WriteLine($"Got record data: {data}");
            }

            if (DateTime.UtcNow >= this.nextCheckpoint)
            {
                input.Checkpointer.Checkpoint();
                this.nextCheckpoint = DateTime.UtcNow + CheckpointInterval;
            }
        }
 public void ProcessRecords(ProcessRecordsInput input)
 {
     if (ProcessFunc != null)
     {
         ProcessFunc.Invoke(input);
     }
 }
Пример #6
0
 public void ProcessRecords(ProcessRecordsInput input)
 {
     RecordProcessor.ProcessRecords(input);
 }
        /// <summary>
        /// This method processes the given records and checkpoints using the given checkpointer.
        /// </summary>
        /// <param name="input">
        /// ProcessRecordsInput that contains records, a Checkpointer and contextual information.
        /// </param>
        public void ProcessRecords(ProcessRecordsInput input)
        {
            Console.Error.WriteLine("Processing " + input.Records.Count + " records from " + _kinesisShardId);

            // Process records and perform all exception handling.
            ProcessRecordsWithRetries(input.Records);

            // Checkpoint once every checkpoint interval.
            if (DateTime.UtcNow >= _nextCheckpointTime)
            {
                Checkpoint(input.Checkpointer);
                _nextCheckpointTime = DateTime.UtcNow + CheckpointInterval;
            }
        }