private string GetDeadLetterDescription() { // truncate the description if it exceeds max var message = Failed.LastOrDefault(); if (message.Length < MaxDeadLetterDescriptionLength) { return(message); } var truncatedSuffix = "...MESSAGE WAS TRUNCATED"; var truncatedMessage = message.Substring(0, MaxDeadLetterDescriptionLength - truncatedSuffix.Length); return(truncatedMessage + truncatedSuffix); }