public void Queue_Processing_HandlingExceptions() { // Enqueue events for further handling bus.Subscribe(testService.Enque <TestEvent>()); StringBuilder log = new StringBuilder(); Delegate <TestEvent> handler = (e) => { log.Append("MainHandler|"); throw new NotImplementedException(); }; bus.Subscribe( handler .WhenQueued().RetryQueued(3, Backoff.None()) .WhenRetryQueueFailed((failedEvent, ex) => log.Append("FailureHandler|")) ); bus.Publish(new TestEvent(), this); while (testService.ProcessEvents().Processed > 0) { Task.Delay(1).Wait(); } ; Assert.AreEqual("MainHandler|MainHandler|MainHandler|MainHandler|FailureHandler|", log.ToString()); }