public async Task<ResultMessage> WriteToFile(NotificationMessage message)
        {
            StreamWriter file = new StreamWriter(@"C:\Users\tarakci\Downloads\akkaLog\notifications.txt", true);
            file.WriteLine($"User ID: {message.UserId} - Message: {message.Notification}");
            file.Close();

            _logger.Info($"Notification has sent to -> {message.UserId}");

            _analyzer.CountNotifications();

            return await Task.FromResult(new ResultMessage()
            {
                Result = "done",
                CreateDate = DateTime.Now
            });
        }
 public void HandleMessage(NotificationMessage message)
 {
     WriteToFile(message).PipeTo(Self, Sender);
 }
 public void HandleNotification(NotificationMessage message)
 {
     _pushNotificationActor.Tell(message);
 }