public void Handle(MessageFailed message) { var failedMessageId = message.FailedMessageId; var exceptionMessage = message.FailureDetails.Exception.Message; var chatMessage = $"Message with id: {failedMessageId} failed with reason: '{exceptionMessage}'. Open in ServiceInsight: {GetServiceInsightUri(failedMessageId)}"; using (var client = new HipchatClient()) { client.PostChatMessage(chatMessage); } }
public Task Handle(MessageFailed message, IMessageHandlerContext context) { var failedMessageId = message.FailedMessageId; var exceptionMessage = message.FailureDetails.Exception.Message; var chatMessage = $@"Message with id: {failedMessageId} failed. Reason: '{exceptionMessage}'. Open in ServiceInsight: {GetServiceInsightUri(failedMessageId)}"; using (var client = new HipchatClient()) { client.PostChatMessage(chatMessage); } return(Task.CompletedTask); }
public void Handle(MessageFailed message) { string failedMessageId = message.FailedMessageId; string exceptionMessage = message.FailureDetails.Exception.Message; string chatMessage = string.Format("Message with id: {0} failed with reason: '{1}'. Open in ServiceInsight: {2}", failedMessageId, exceptionMessage, GetServiceInsightUri(failedMessageId)); using (HipchatClient client = new HipchatClient()) { client.PostChatMessage(chatMessage); } }