Exemple #1
0
 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);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
 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();
                };
            }
Exemple #5
0
        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)
                );
        }