private void OnSendTicketFailed(object sender, TicketSendFailedEventArgs e) { _log.Info($"Sending ticket '{e.TicketId}' failed."); var task = _ticketHandler.HandleFailureTimeout(e.TicketId); if (task != null) { task.Wait(); task.Dispose(); } }
private void PublisherOnTicketSendFailed(object sender, TicketSendFailedEventArgs ticketSendFailedEventArgs) { _executionLog.LogInformation($"Publish of ticket {ticketSendFailedEventArgs.TicketId} failed."); // first clean it from awaiting ticket response lock (_lockForTicketsForNonBlockingRequestsCache) { if (_ticketsForNonBlockingRequests.Contains(ticketSendFailedEventArgs.TicketId)) { _ticketsForNonBlockingRequests.Remove(ticketSendFailedEventArgs.TicketId); } } SendTicketFailed?.Invoke(sender, ticketSendFailedEventArgs); }
private void PublisherChannelOnMqMessagePublishFailed(object sender, MessagePublishFailedEventArgs messagePublishFailedEventArgs) { _executionLog.Info($"Message publishing failed with correlationId: {messagePublishFailedEventArgs.CorrelationId}, errorMessage: {messagePublishFailedEventArgs.ErrorMessage}, routingKey: {messagePublishFailedEventArgs.RoutingKey}."); var ticketId = string.Empty; var ci = _ticketCache.Values.FirstOrDefault(f => f.CorrelationId == messagePublishFailedEventArgs.CorrelationId); if (!string.IsNullOrEmpty(ci?.TicketId)) { ticketId = ci.TicketId; } var json = Encoding.UTF8.GetString(messagePublishFailedEventArgs.RawData.ToArray()); var arg = new TicketSendFailedEventArgs(ticketId, json, messagePublishFailedEventArgs.ErrorMessage); TicketSendFailed?.Invoke(sender, arg); }
private void OnSendTicketFailed(object sender, TicketSendFailedEventArgs e) { _log.LogInformation($"Sending ticket '{e.TicketId}' failed."); }