protected override void PreStart() { _fileObserver = new FileOberserver(_filePath, Self); _fileObserver.Start(); _stream = new FileStream(_filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); _reader = new StreamReader(_stream); var fileContent = _reader.ReadToEnd(); var message = new InitialReadMessage(_filePath, fileContent); Self.Tell(message); }