Beispiel #1
0
            public Logic(KinesisSourceStage stage) : base(stage.Shape)
            {
                _settings      = stage.Settings;
                _out           = stage.Outlet;
                _kinesisClient = stage._clientFactory();

                SetHandler(_out, onPull: () => _self.Tell(Pump.Instance));
            }
Beispiel #2
0
 /// <summary>
 /// Creates a basic source that will allow to connect to a single AWS Kinesis stream and shard.
 /// To combine sources targetting multiple shards, use <see cref="SourceOperations.Merge{TOut1,TOut2,TMat}"/> method.
 ///
 /// All requests will be send via provided Amazon Kinesis <paramref name="client"/>. After materialization,
 /// current Akka.NET Stream will take full responsibility for managing that client, disposing it
 /// once stream will be stopped.
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="client"></param>
 /// <returns></returns>
 public static Source <Record, NotUsed> Basic(ShardSettings settings, Func <IAmazonKinesis> client = null) =>
 Source.FromGraph(new KinesisSourceStage(settings, client ?? KinesisFlow.DefaultClientFactory));