public static void Subscribe(EndpointConfiguration endpointConfiguration) { ErrorsNotifications errors = endpointConfiguration.Notifications.Errors; errors.MessageHasBeenSentToSecondLevelRetries += (sender, retry) => Log(retry); errors.MessageHasFailedAFirstLevelRetryAttempt += (sender, retry) => Log(retry); errors.MessageSentToErrorQueue += (sender, retry) => Log(retry); }
void Subscribe(Notifications notifications) { ErrorsNotifications errors = notifications.Errors; errors.MessageHasBeenSentToSecondLevelRetries += (sender, retry) => LogEvent(retry); errors.MessageHasFailedAFirstLevelRetryAttempt += (sender, retry) => LogEvent(retry); errors.MessageSentToErrorQueue += (sender, retry) => LogEvent(retry); }
public Task Start(IMessageSession session) { ErrorsNotifications errors = busNotifications.Errors; errors.MessageHasBeenSentToSecondLevelRetries += (sender, retry) => LogToConsole(retry); errors.MessageHasFailedAFirstLevelRetryAttempt += (sender, retry) => LogToConsole(retry); errors.MessageSentToErrorQueue += (sender, retry) => LogToConsole(retry); return Task.FromResult(0); }
public Mutator(Notifications busNotifications) { ErrorsNotifications errors = busNotifications.Errors; errors.MessageSentToErrorQueue += (sender, retry) => { string headerText = HeaderWriter.ToFriendlyString <HeaderWriterError>(retry.Headers); headerText = BehaviorCleaner.CleanStackTrace(headerText); headerText = StackTraceCleaner.CleanStackTrace(headerText); SnippetLogger.Write(text: headerText, suffix: "Error", version: "6"); ManualResetEvent.Set(); }; }
public void Start() { ErrorsNotifications errors = busNotifications.Errors; DefaultScheduler scheduler = Scheduler.Default; unsubscribeStreams.Add( errors.MessageSentToErrorQueue .ObserveOn(scheduler) .Subscribe(LogEvent) ); unsubscribeStreams.Add( errors.MessageHasBeenSentToSecondLevelRetries .ObserveOn(scheduler) .Subscribe(LogEvent) ); unsubscribeStreams.Add( errors.MessageHasFailedAFirstLevelRetryAttempt .ObserveOn(scheduler) .Subscribe(LogEvent) ); }