Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/migration-v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ IAsyncPolicy<HttpResponseMessage> asyncPolicyT = Policy.RateLimitAsync<HttpRespo

### Rate limit in v8

> [!NOTE]
> In v8, you have to add the [`Polly.RateLimiting`](https://www.nuget.org/packages/Polly.RateLimiting) package to your application otherwise you won't see the `AddRateLimiter` extension.

<!-- snippet: migration-rate-limit-v8 -->
```cs
// The equivalent to Polly v7's RateLimit is the SlidingWindowRateLimiter.
Expand Down Expand Up @@ -476,6 +479,9 @@ IAsyncPolicy<HttpResponseMessage> asyncPolicyT = Policy.BulkheadAsync<HttpRespon

### Bulkhead in v8

> [!NOTE]
> In v8, you have to add the [`Polly.RateLimiting`](https://www.nuget.org/packages/Polly.RateLimiting) package to your application otherwise you won't see the `AddConcurrencyLimiter` extension.

<!-- snippet: migration-bulkhead-v8 -->
```cs
// Create pipeline with concurrency limiter. Because ResiliencePipeline supports both sync and async
Expand Down Expand Up @@ -779,6 +785,9 @@ registry.GetOrAddPipeline("my-key", builder => builder.AddTimeout(TimeSpan.FromS

In certain scenarios, you might not want to migrate your code to the v8 API. Instead, you may prefer to use strategies from v8 and apply them to v7 APIs. Polly provides a set of extension methods to support easy conversion from v8 to v7 APIs, as shown in the example below:

> [!NOTE]
> In v8, you have to add the [`Polly.RateLimiting`](https://www.nuget.org/packages/Polly.RateLimiting) package to your application otherwise you won't see the `AddRateLimiter` extension.

<!-- snippet: migration-interoperability -->
```cs
// First, create a resilience pipeline.
Expand Down