Beispiel #1
0
 public PrestoSourceActor(BufferBlock <IEventEnvelope> buffer, bool isLive, IPrestoEventSourceMessage message)
 {
     _buffer             = buffer;
     _self               = Self;
     _log                = Context.GetLogger();
     _scheduler          = Context.System.Scheduler.Advanced;
     _topicName          = TopicName.Get(message.Topic);
     _message            = message;
     _toMessageId        = message.ToMessageId;
     _lastEventMessageId = _message.FromMessageId;
     _partitionIndex     = ((MessageId)MessageIdUtils.GetMessageId(message.FromMessageId)).PartitionIndex;
     _queryRange         = message.ToMessageId - message.FromMessageId;
     FirstQuery(isLive);
 }
Beispiel #2
0
 public static Props Prop(BufferBlock <IEventEnvelope> buffer, bool isLive, IPrestoEventSourceMessage message)
 {
     return(Props.Create(() => new PrestoSourceActor(buffer, isLive, message)));
 }