private IEasyCachingBus CreateDecoratedProvider() => ServiceBuilders.CreateFakeBus(options => { options.BusFactory = CreateBus; options.DecorateWithPublishFallback( exceptionFilter: exception => exception is InvalidOperationException); });
private IEasyCachingBus CreateDecoratedProvider() => ServiceBuilders.CreateFakeBus(options => { options.BusFactory = CreateBus; options.DecorateWithRetry( retryCount: 1, exceptionFilter: exception => exception is InvalidOperationException); });
protected IEasyCachingBus CreateDecoratedProvider() => ServiceBuilders.CreateFakeBus(options => { options.BusFactory = CreateBus; var circuitBreakerParameters = new CircuitBreakerParameters( exceptionsAllowedBeforeBreaking: 1, durationOfBreak: TimeSpan.FromMinutes(1)); options.DecorateWithCircuitBreaker( initParameters: circuitBreakerParameters, executeParameters: circuitBreakerParameters, subscribeRetryInterval: TimeSpan.FromMilliseconds(1), exceptionFilter: exception => exception is InvalidOperationException); });