You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've implemented a custom retry mechanism using Polly in the PollyResiliencePipelineProvider. Despite configuring the ShouldHandle property and providing retry strategies, retries are not triggered for retryable exceptions or HTTP status codes.
Configure Ocelot with a downstream service returning 503 status.
Use the provided custom PollyResiliencePipelineProvider.
Observe that the retry policy does not trigger as expected.
I've implemented a custom retry mechanism using Polly in the PollyResiliencePipelineProvider. Despite configuring the ShouldHandle property and providing retry strategies, retries are not triggered for retryable exceptions or HTTP status codes.
Code Snippet:
`
public class PollyResiliencePipelineProvider : PollyQoSResiliencePipelineProvider
{
private readonly OcelotGlobalConfiguration _options;
private readonly IOcelotLogger _logger;
public PollyResiliencePipelineProvider(
IOptions options,
IOcelotLoggerFactory loggerFactory,
ResiliencePipelineRegistry registry)
: base(loggerFactory, registry)
{
_options = options.Value;
_logger = loggerFactory.CreateLogger();
}
}
`
.AddPolly<PollyResiliencePipelineProvider>();
Log:
Specifications
Expected Behavior:
The retry logic should trigger on HTTP 503 status codes or HttpRequestException.
Actual Behavior:
The retry mechanism is not invoked, and no retry attempts are logged.
The text was updated successfully, but these errors were encountered: