public static IServiceBusBuilder UsePublisherRetry(this IServiceBusBuilder config, int retryCount, Func <int, TimeSpan> sleepDurationProvider) { var policy = Policy.Handle <Exception>() .WaitAndRetryAsync(retryCount, sleepDurationProvider); return(config.UsePublisherRetry(policy)); }
public static IServiceBusBuilder UsePublisherRetry(this IServiceBusBuilder config, params TimeSpan[] sleepDurations) { var policy = Policy.Handle <Exception>() .WaitAndRetryAsync(sleepDurations); return(config.UsePublisherRetry(policy)); }