public ErrorQueueMessageVisualization get_error_message_details_Port_QueueName_SourceInstanceId_MessageId( ErrorMessageInputModel input) { var messageId = new MessageId { MessageIdentifier = input.MessageId, SourceInstanceId = input.SourceInstanceId }; var message = RetrieveMessage(messageId, input.Port, input.QueueName); if (message == null) { _fubuRequest.Set(new QueueMessageNotFound { Id = messageId, QueueName = input.QueueName }); return(null); } var errorReport = ErrorReport.Deserialize(message.Data); var exceptionDetails = new ExceptionDetails { Explanation = errorReport.Explanation, ExceptionType = errorReport.ExceptionType, ExceptionMessage = errorReport.ExceptionMessage, ExceptionText = errorReport.ExceptionText }; var envelope = new Envelope(new NameValueHeaders(message.Headers)) { Data = errorReport.RawData }; envelope.UseSerializer(_serializer); return(new ErrorQueueMessageVisualization { MessageId = messageId, QueueName = message.Queue, SubQueueName = message.SubQueue, Status = message.Status, SentAt = message.SentAt, Headers = message.Headers, Payload = envelope.Message, ExceptionDetails = exceptionDetails }); }
public ErrorQueueMessageVisualization get_error_message_details_Port_QueueName_SourceInstanceId_MessageId( ErrorMessageInputModel input) { var messageId = new MessageId { MessageIdentifier = input.MessageId, SourceInstanceId = input.SourceInstanceId }; var message = RetrieveMessage(messageId, input.Port, input.QueueName); if (message == null) { _fubuRequest.Set(new QueueMessageNotFound { Id = messageId, QueueName = input.QueueName }); return null; } var errorReport = ErrorReport.Deserialize(message.Data); var exceptionDetails = new ExceptionDetails { Explanation = errorReport.Explanation, ExceptionType = errorReport.ExceptionType, ExceptionMessage = errorReport.ExceptionMessage, ExceptionText = errorReport.ExceptionText }; var envelope = new Envelope(new NameValueHeaders(message.Headers)) {Data = errorReport.RawData}; envelope.UseSerializer(_serializer); return new ErrorQueueMessageVisualization { MessageId = messageId, QueueName = message.Queue, SubQueueName = message.SubQueue, Status = message.Status, SentAt = message.SentAt, Headers = message.Headers, Payload = envelope.Message, ExceptionDetails = exceptionDetails }; }